Commit Graph
8 Commits
Author SHA1 Message Date
Casey McGinty d019d15f2b Add build define to manually enable -rdynamic LD flag 2018-09-12 14:00:08 -07:00
Casey McGinty b703181f93 Disable -rdynamic LD option on Windows 2018-09-11 16:19:34 -07:00
Casey McGinty b9118ecdab Update comments, and LD flag usage in Make 2018-09-11 14:49:47 -07:00
Casey McGinty 2224ecd718 Remove dead code and method name typo 2018-09-11 11:56:50 -07:00
Casey McGinty d4337b6f1d Move ABRThandler func out of internal lib 2018-09-11 11:39:49 -07:00
Casey McGinty 2a3967b7c4 Refactor abort signal handling
- Print signal name to term
- Add -rdynamic option to generate Linux symbol names in backtrace
- Raise default signal after handler to ensure program termination
2018-09-11 10:40:45 -07:00
Casey McGinty a06574fc97 Print a stack trace on unexpected term signal (e.g. SIGABRT)
For OSX and Linux, add a signal handler to SIGABRT, SGIFPE, SIGILL,
SIGSEGV, and SIGBUS. When the program terminates unexpectedly the
handler will print the current stack to the terminal to help determine
the location of the failure.

On OSX the output will look like:

```
Stack trace:
4   zstd                                0x000000010927ed96 main + 16886
5   libdyld.dylib                       0x00007fff767d1015 start + 1
6   ???                                 0x0000000000000001 0x0 + 1
```

On Linux the output will look like:

```
Stack trace:
./zstd() [0x4b8e1b]
./zstd() [0x4b928a]
./zstd() [0x403dc2]
/lib64/libc.so.6(__libc_start_main+0xf5) [0x7f5e0fbb0445]
./zstd() [0x405754]
```

As is, the code does not function on WIN32.

See also: https://oroboro.com/stack-trace-on-crash/
2018-09-06 18:46:52 -07:00
Casey McGinty 986ead646b Add optional description field support to "list" target 2018-08-30 17:00:17 -07:00