Re: Memmove causing program crashes, giving SIGTRAP in GDB(?)
Jon Turney via Cygwin <[email protected]>
| Newsgroups | gmane.os.cygwin |
|---|---|
| Message-ID | <[email protected]> |
On 26/02/2026 06:22, KENNON J CONRAD via Cygwin wrote: > Hi Brian, > I'd add to that a reference to [1] [1] https://cygwin.com/faq.html#faq.programming.debugging-cygwin Unfortunately, when investigating exceptions inside the cygwin dll, it's necessary to 'set cygwin-exceptions on', which will cause the debugger to actually stop at the point of the exception. (This explains why the specific exception is SIGTRAP, and why you get the all the extra frames for exception handling below memmove in the backtrace) > I installed the version of the cygwin-debuginfo that is on my test computer to the build machine (version 3.6.6-1). I put the memmove back in the code in place of the bloated code that has been running the past 4 days without any problem (and the past ~10 years before changing to memset) and got another SIGTRAP in gbd on that memset within 2 hours. The backtrace looks very similar: > > #0 0x00007ff97e40a98b in KERNELBASE!DebugBreak () from /cygdrive/c/Windows/system32/KERNELBASE.dll > No symbol table info available. > #1 0x00007ff96ba86417 in cygwin1!.assert () from /cygdrive/c/Windows/cygwin1.dll > No symbol table info available. > #2 0x00007ff96ba9fb18 in secure_getenv () from /cygdrive/c/Windows/cygwin1.dll > No symbol table info available. > #3 0x00007ff980c5d82d in ntdll!.chkstk () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll > No symbol table info available. > #4 0x00007ff980c0916b in ntdll!RtlRaiseException () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll > No symbol table info available. > #5 0x00007ff980c5c9ee in ntdll!KiUserExceptionDispatcher () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll > No symbol table info available. > #6 0x00007ff96ba812a9 in memmove () from /cygdrive/c/Windows/cygwin1.dll > No symbol table info available. Hmmm.... if you've successfully installed the matching cygwin-debugininfo package on the machine running gdb, you should get getting symbol information here, so something's not quite right. > #7 0x00000001004099ec in rank_scores_thread (arg=0x6ffecf1c0010) at GLZAcompress.c:854 > new_score_rank = 767 > new_score_lmi2 = 333188156 > new_score_pmi2 = 333188149 > rank = 3360 > max_rank = 767 > num_symbols = 7 > new_score_lmi = 332397489 > new_score_pmi = 332397482 > thread_data_ptr = 0x6ffecf1c0010 > max_scores = 3361 > candidates_index = 0xa00034460 > score_index = 3319 > node_score_num_symbols = 14 > num_candidates = 3361 > node_ptrs_num = 49710 > local_write_index = 49711 > rank_scores_buffer = 0x6ffecf1c0020 > candidates = 0x6ffecf2c0020 > score = 50.3955727 > #8 0x00007ff96bae2eec in cygwin1!.getreent () from /cygdrive/c/Windows/cygwin1.dll > No symbol table info available. > #9 0x00007ff96ba847d3 in cygwin1!.assert () from /cygdrive/c/Windows/cygwin1.dll > No symbol table info available. > #10 0x0000000000000000 in ?? () > No symbol table info available. -- 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