Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cling should show line numbers upon segmentation fault in loaded library #482

Open
vickeykumar opened this issue Dec 26, 2022 · 0 comments

Comments

@vickeykumar
Copy link

[cling]$ .L libdsa.so
[cling]$ #include "include/hashmap.h"
[cling]$ int data=21
(int) 21
...
...
[cling]$ hashmap_insert(m, "hello", sizeof("hello"), &data, 4)
cling(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x33)[0x55f2b9c37b2d]
cling(+0x1bbabc0)[0x55f2b9c37bc0]
cling(_ZN4llvm3sys17RunSignalHandlersEv+0x99)[0x55f2b9c35df3]
cling(+0x1bba399)[0x55f2b9c37399]
cling(_ZN9textinput18TerminalConfigUnix12HandleSignalEi+0x7a)[0x55f2b9c9f486]
cling(+0x1c221d4)[0x55f2b9c9f1d4]
/lib/x86_64-linux-gnu/libc.so.6(+0x3ef10)[0x7fdf3aaccf10]
/root/ds/dsa/libdsa.so(_Z14hashmap_insertP8_hashmapPKvjS2_j+0x9b)[0x7fdf3a88aab8]
[0x7fdf3be9b070]

cling(_ZNK5cling19IncrementalExecutor14executeWrapperEN4llvm9StringRefEPNS_5ValueE+0xad)[0x55f2b9ad87a3]
cling(_ZN5cling11Interpreter11RunFunctionEPKN5clang12FunctionDeclEPNS_5ValueE+0xf2)[0x55f2b9b17982]
cling(_ZN5cling11Interpreter16EvaluateInternalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_18CompilationOptionsEPNS_5ValueEPPNS_11TransactionEm+0x30b)[0x55f2b9b18621]
cling(_ZN5cling11Interpreter7processERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_5ValueEPPNS_11TransactionEb+0x186)[0x55f2b9b16472]
cling(_ZN5cling13MetaProcessor7processEN4llvm9StringRefERNS_11Interpreter17CompilationResultEPNS_5ValueEb+0x2ce)[0x55f2b9bc18f8]
cling(_ZN5cling13UserInterface16runInteractivelyEb+0x35c)[0x55f2b9c9385e]
cling(main+0x6d3)[0x55f2b98bfa95]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7fdf3aaafc87]
cling(_start+0x2a)[0x55f2b98bf14a]
Stack dump:
0. Program arguments: cling
Segmentation fault
root@3c992cdf50bf:~/ds/dsa#

unable to interpret above backtrace, it would be better if we are able to see the line numbers as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant