libera/#clasp - IRC Chatlog
Search
13:12:15
drmeister
So they both point onto the stack within the stack frame of a particular function?
13:14:46
drmeister
I want to enhance the new `lde` command - it prints the dynamic environment stack so that for each entry it tells me what stack frame (matching the `backtrace` command) it points into.
13:25:30
drmeister
Now, will those values ALWAYS fall between a $rbp of one stack frame and the next?
13:54:52
drmeister
https://waylonwalker.com/tmux-copy-mode/#:~:text=tmux%20copy%2Dmode%20is%20a,enter%20to%20copy%20the%20selection.
14:01:56
drmeister
I'm trying to figure out how to get the frame pointer for each stack frame in a Python list.
14:03:09
drmeister
Actually - I want the stack frame value and the frame index (as given by the `backtrace` gdb command) together.
14:07:08
yitzi
I am getting closer to being about to share fasos between cclasp and eclasp. This will result in cutting out the compilation of ~400 files during eclasp.
14:19:24
yitzi
Loading babel's string.lisp takes 7 minutes on zeus. Just to give y'all an idea of happens to load times in eclasp.
15:23:30
drmeister
Line 1 - we are in the frame of the broken sjlj_unwind and we print 5 frames of backtrace.
15:25:09
drmeister
Line 10: I inspect that object and it shows the target 0x7ffe8b37f300 and frame 0x7ffe8b37f530
15:26:16
drmeister
It prints the tagged pointer for the DynEnv, the class of the DynEnv, and the fields of the DynEnv.
15:27:25
drmeister
In parenthesis is the backtrace frame level of whatever fields of the DynEnv are pointing into the stack. eg: (#2 )
15:28:30
drmeister
Ok, now I'll evaluate the first sjlj_proceed and see what everything looks like right after that sjlj_proceed.
15:35:49
drmeister
It's probably perfectly fine - but something else I could guess would be done here is to advance the dynEnv stack - but I don't know all the details.
15:57:17
Bike
the unwind protect target should be a setjmp that runs the cleanup code and then resumes unwinding
16:12:22
drmeister
I'm single stepping machine instructions through the unwind - learning how this works.
16:35:47
drmeister
Then there is another `sjlj_unwind_proceed` to that 0x7f3c709fa849 TagbodyDynEnv_O DynEnv again.
16:41:26
drmeister
The bad `sjlj_unwind_proceed` is called by `sjlj_continue_unwinding` from the cleanup clause of a funwind_protect
16:55:40
drmeister
I'm thinking that `my_thread->_UnwindDest` and `my_thread->_UnwindDestIndex` are not being updated after an unwind.
16:59:17
drmeister
They are only ever set here when we enter `sjlj_unwind_proceed` and then they are set to the dest and index that we are currently unwinding to.
17:06:51
drmeister
I put a watchpoint on my_thread->_UnwindDest and as expected, it is not changed other than at the top of the first `sjlj_unwind_proceed`
17:29:31
drmeister
Or `sjlj_continue_unwinding` isn't supposed to just invoke `sjlj_unwind_proceed(gc::As_unsafe<DestDynEnv_sp>(my_thread->_UnwindDest), my_thread->_UnwindDestIndex);` and it should do something that accounts for what has already been unwound?
17:49:16
drmeister
::notify Bike It looks like _UnwindDest and _UnwindDestIndex are not being updated properly when functions return and the stack unwinds. sjlj_continue_unwinding invokes sjlj_unwind_proceed( gc::As_unsafe<DestDynEnv_sp>(my_thread->_UnwindDest), my_thread->_UnwindDestIndex) but my_thread->_UnwindDest and my_thread->_UnwindDestIndex are never set anywhere other than sjlj_unwind_proceed. This means a stale DynEnv is proceeded from from
17:50:36
drmeister
I'll be AFK for a while running an errand. Call me if you have time to chat about it.
17:53:55
drmeister
I realize it's kind of a dick move to ask all these questions on a Saturday, ...but it's the weekend mornings I can finally focus on debugging tricky problems. I appreciate the attention that you put into this on the weekends. It's probably best to let me spin my wheels for a while narrowing down the problem.
18:29:46
Colleen
Bike: drmeister said 40 minutes, 30 seconds ago: It looks like _UnwindDest and _UnwindDestIndex are not being updated properly when functions return and the stack unwinds. sjlj_continue_unwinding invokes sjlj_unwind_proceed( gc::As_unsafe<DestDynEnv_sp>(my_thread->_UnwindDest), my_thread->_UnwindDestIndex) but my_thread->_UnwindDest and my_thread->_UnwindDestIndex are never set anywhere other than sjlj_unwind_proceed. This means a stale DynEnv is proceeded from from
18:30:03
Bike
unwind dest and index aren't _supposed_ to be updated, i think. they're the ultimate destination and index
18:36:11
Bike
continue_unwinding should onlye ver be invoked in the middle of unwinding to some higher destination, i.e. _UnwindDest should always be on the stack from there
19:15:47
drmeister
Then we shouldn’t be invoking continue_unwinding because the destination was already past.
19:27:31
yitzi
drmeister: I've succeeded in merging the cclasp and eclasp fasl folders. No more need for names like `SRC:LIB;ECLASP-BITCODE-BLA;` ... and eclasp reuses the fasos from the cclasp image. 400 less file compilations.
20:47:42
drmeister
Do you have any recommendations for additional debugging info? Can we trace entry into sjlj_unwind and leaving setjmp to try/catch?
21:09:39
Bike
it sounds like the problem is unwinding past where we should be, so i guess it would make sense to trace entry into sjlj_unwind_proceed and figure out whether the destination is actually live when we start each sub-exit