• Vineet Gupta's avatar
    ARC: handle gcc generated __builtin_trap() · f5a16b93
    Vineet Gupta authored
    gcc toggle -fisolate-erroneous-paths-dereference (default at -O2
    onwards) isolates faulty code paths such as null pointer access, divide
    by zero etc by emitting __builtin_trap()
    
    Newer ARC gcc generates TRAP_S 5 instruction which needs to be handled
    and treated like any other unexpected exception
      - user mode  : task terminated with a SEGV
      - kernel mode: die() called after register and stack dump
    Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
    f5a16b93
troubleshoot.c 6.51 KB