Update to latest cygwin creates crashes in dlclose()

Cary R. cygcary@yahoo.com
Mon Aug 25 17:30:00 GMT 2014

>On Aug 22 16:45, Cary R. wrote:
>> I upgraded to the latest cygwin earlier today (it has probably been
>> a month or more since I last updated) and now a program that has been
>> working is crashing (segfault) when calling dlclose(). dlopen() and
>> calling a function in the DLL still works just fine. An older version
>> of the program still works correctly so it's not just simply calling
>> dlclose() but something more context dependent.

> Is you applications written in C++?

Yes the primary application is C++. The DLL is mixed C and C++.

> Does recompiling with the latest gcc 4.8.3-3 fix the issue?

make distclean, a reconfigure and then a complete recompile was the
first thing I tried when I noticed the failure and that did not fix
the crash.

> Typically a SEGV creates a stackdump file. Can you show us?

No stackdump file is being created. If I remove the call to dlclose()
the application does not SEGV and appears to run correctly.

Here is the output from gdb:

~/src/verilog/iverilog-push/iverilog/vvp > gdb ./vvp-dev.exe
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./vvp-dev.exe...done.
(gdb) run  -M../vpi ../../iverilog/vvp/examples/hello.vvp
Starting program: /cygdrive/c/src/verilog/iverilog-push/iverilog/vvp/vvp-dev.exe -M../vpi ../../iverilog/vvp/examples/hello.vvp
[New Thread 4152.0x78c]
[New Thread 4152.0x1254]
Warning: vvp input file may not be correct version!
Hello, World.

Program received signal SIGSEGV, Segmentation fault.
0x6314c658 in ?? ()
(gdb) bt
#0  0x6314c658 in ?? ()

The version warning is expected and is not related to this issue.
I have also compiled this example using a suffix "-dev", but the
non-suffix version also has the same issue.

The "Hello, World" output is being generated in the DLL and is
the expected output for this example.

> Last but not least, do you have a simple testcase to reproduce the issue?

I do not have a simple test case yet. Since this is an open source
application you could compile it to observe the behavior, but I was
planning to look into this more based on any feedback and my available
free time this week.


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

More information about the Cygwin mailing list