Bug 736876

Summary: SEGV using GSoap (at application exit) even with minimal code
Product: [Fedora] Fedora Reporter: Derek Atkins <warlord>
Component: gsoapAssignee: Matthew Farrellee <matt>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 15CC: mattias.ellert, matt
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-09 14:37:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Tarfile of test case none

Description Derek Atkins 2011-09-08 22:58:58 UTC
Created attachment 522214 [details]
Tarfile of test case

Description of problem:

I'm working on a gsoap application and my application is SEGfaulting during exit.  I worked to get a testcase down to the minimal amount to show the issue.  I've attached everything you need to work the problem and show the issue.


Version-Release number of selected component (if applicable):

gsoap-2.7.17-3.fc15.x86_64


How reproducible:

100%


Steps to Reproduce:
1. untar the attached test sources
2. gcc -g -o test-gsoap test-gsoap.c -lgsoapssl -lssl
3. run test-gsoap and see the SEGV
  
Actual results:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x0000000000606030 in ?? ()
#2  0x00007fffffffe228 in ?? ()
#3  0x0000000000000000 in ?? ()
(gdb) q


Expected results:

Code shouldn't segfault.

Additional info:

The test code attached is a minimal app to show the issue.

Comment 1 Mattias Ellert 2011-09-09 14:37:07 UTC
When using the gsoap libraries you must use the same CFLAGS that where used when the libraries were compiled. The preferred way to do this is to use pkg-config. In your example you are using the gsoapssl library. For correct operation you should then compile your code with `pkg-config --cflags gsoapssl`.

When I do this I do not get a segfault with your test code:

$ gcc -g `pkg-config --cflags gsoapssl` -o test-gsoap test-gsoap.c -lgsoapssl -lssl
$ ./test-gsoap
$ 

If I leave out the pkg-config part I can reproduce your error.