No wonder I was never able to do anything with that core file on OpenBSD - it needs lldb, not gdb: image.png
Not sure what to make of it, but finally got it...
that base variable is suspicious
looks like it's actually a pointer to mged_curr_dm->dm_mged_variables
I bet it's the offset getting calculated incorrectly.
loc is set to base + sdp->sp_offset
sdp is a line in the parsetab with sp_offset defined in the struct. the struct is mged_curr_dm->dm_mged_variables so it could be that mged_curr_dm is invalid or dm_mged_variables isn't initialized or dm_mged_variables is initailized but has bad offset values.
or mged_curr_dm is random garbage
next step would probably be to identify which mged_variables is being used/set there, check dm_curr-dm for validity, and find where it's initalizing the fields of dm_mged_variables.
I wish I knew which test was doing that - "make check" produces it, but despite making a core file it doesn't halt the test. Suggests something isn't checking a test return code somewhere, unless it's possible to dump a core and still complete "successfully"...
Hmm... wonder if lldb can tell me from the core file...
It's a little hard to follow, but it looks like it's running "vars " and when I do that in isolation the output does look strange: image.png
This is handy: https://www.nesono.com/sites/default/files/lldb%20cheat%20sheet.pdf
Whee! valgrind doesn't like the vars command run, even on Linux.
yeah, that looks like memory corruption.
I wonder if I updated mged_variables but never updated mged_vparse...
looks like mged_curr_dm has to be involved, so maybe related to the dm init logic and the specific invocation mode of the script (like running with redirected input or something)
Wow. "mged> vars" shows valgrind issues at least as far back as 70555...
Make that r62647 - getting old enough it's hard to test...
OK, clearly not a release blocker...
/me wonders if "vars" would be better called "settings" - for what it seems to be intended to be, I wouldn't have thought to look first for a "vars" command...
It definitely looks like the parsing is what's going wrong - gdb's reporting of the struct contents themselves seems to be OK...
Doh.
There we go - r78028.
/me tries OpenBSD again
hey everyone!
I was curious if I can contribute with the knowledge of c++
Do you mean specifically on OpenBSD?
@Aniket Khandagale If you mean C++ generically there's lots of opportunity - the new Qt graphical interface work, for example, is in Qt with C++
Last updated: Jan 09 2025 at 00:46 UTC