On 18/10/2022 11:35, David Allsopp wrote:
I'm wondering if I may be able to have some pointers for debugging what
seems to be an unexpected interaction between mmap/mprotect/munmap and
malloc with the OCaml runtime.

At the moment, I know that we crash in malloc, so my main question is how to
go further in gdb. I installed the cygwin-debuginfo package, but all I'm
getting is:

Firstly, if the crash is inside the cygwin DLL, you must follow the advice in [1], and use 'set cygwin-exceptions on' to tell gdb to stop on an exception inside cygwin itself.

[1] https://cygwin.com/faq.html#faq.programming.debugging-cygwin


/cygdrive/d/a/scallywag/gdb/gdb-11.2-1.x86_64/src/gdb-11.2/gdb/infrun.c:2550
: internal-error: void resume_1(gdb_signal): Assertion
`pc_in_thread_step_range (pc, tp)' failed.

This looks similar to the gdb crash reported [2], which I just don't have any time to look into.

[2] https://cygwin.com/pipermail/cygwin/2022-June/251714.html

I'd suggest reporting this as directed in https://www.sourceware.org/gdb/bugs/

(Note that self-service account creation is disabled on the sourceware bugzilla, due to spam problems, so you need to mail overseers as directed there, to request a Sourceware Bugzilla account.)

The reproduction case is below (it's the OCaml runtime, so it's not exactly
minimal, but it seems to be very repeatable to get gdb to the position of
the crash).

[...]

Any assistance to debug this further hugely appreciated!

It might be worth exploring if this gdb crash is seen in older versions of gcc, or with older gcc...


--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to