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

feat: add stack backtrace #548

Closed
wants to merge 5 commits into from
Closed

Conversation

infdahai
Copy link

@infdahai infdahai commented Mar 24, 2023

issue : #309

just move the stack trace impl in muduo to bustub.

Signed-off-by: clundro <clusternlh@gmail.com>
@skyzh
Copy link
Member

skyzh commented Mar 24, 2023

Wow, this is really useful! Thanks a lot!

@infdahai

This comment was marked as spam.

Signed-off-by: clundro <clusternlh@gmail.com>
@infdahai
Copy link
Author

for example,

current assert behavior:

[ RUN      ] LockManagerDeadlockDetectionTest.CycleTest1
~/workspace/bustub-private/test/concurrency/deadlock_detection_test.cpp:218: Failure
Expected equality of these values:
  1
  txn_id
    Which is: 4
[  FAILED  ] LockManagerDeadlockDetectionTest.CycleTest1 (50 ms)

expected assert behavior:

[ RUN      ] LockManagerDeadlockDetectionTest.CycleTest1
~/workspace/bustub-private/test/concurrency/deadlock_detection_test.cpp:218: Failure
Expected equality of these values:
  1
  txn_id
    Which is: 4

backtrace:
/workspace/.../a.cpp:100
/workspace/.../b.cpp:50

[  FAILED  ] LockManagerDeadlockDetectionTest.CycleTest1 (50 ms)

@infdahai

This comment was marked as spam.

@skyzh skyzh changed the title [feat] add StackTrace feat: add stack backtrace Mar 25, 2023
) )

1. when D_Assert failed, throw internal exception.

Signed-off-by: clundro <clusternlh@gmail.com>
Signed-off-by: clundro <clusternlh@gmail.com>
@skyzh
Copy link
Member

skyzh commented Apr 7, 2023

after trying this on private repo, it seems that we cannot de-mangle symbols on macOS. Probably I'll prefer wait for another compiler version bump and use https://en.cppreference.com/w/cpp/utility/basic_stacktrace instead in C++ 23.

@infdahai
Copy link
Author

infdahai commented Apr 7, 2023

ok, maybe this situation is related to NationalSecurityAgency/ghidra#4652. so shall i close the pr or change it to use basic_stacktrace?

@skyzh
Copy link
Member

skyzh commented Apr 7, 2023

Let’s keep it and I’ll probably see if there’s any chance to integrate it.

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

Successfully merging this pull request may close these issues.

2 participants