This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

weird seg. fault related to fhandler_pipe::get_guard()


Hi there,
I checked up all the archives and FAQ but seems not got a resolve. Ok here is the details:
My pc is HP with XP Pro; the cygwin version is 1.5.24 (Jan.31,2007).
The basic structure of my program is like this:
main() {
:
:
status=A(file_input_name, ..);
:
}
A(input_file,..){
:
:
status=B(input_file,..);
:
status=C(input_file,..);
:
}
B(input_file){
:
status=D(input_file);
:
}
C(input_file){
:
status=D(input_file);
:
}
D(input_file){
:
fp=fopen(input_file);
:
fclose(fp);
}
Building was a success, but when run it I got a segmentation fault immediately while executing function C (B was fine, and nothing was run in C). The code has no any problems on linux, solaris and irix. Followings are results from gdb running and  xxx.exe.stackdump.
gdb output:
Program received signal SIGSEGV, Segmentation fault.
0x005e5b63 in fhandler_pipe::get_guard()
xxx.exe.stackdump looks like this:
Exception: STATUS_STACK_OVERFLOW at eip=005E5B63
eax=0003C41C ebx=00A510E8 ecx=000323CC edx=00000001 esi=001A77F0 edi=00B06F38
ebp=000773D8 esp=000773C4 program=c:\HEGwin\heg\bin\gdtif.exe, pid 3800, thread main
cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
Stack trace:
Frame     Function  Args
000773D8  005E5B63  (001A77F0, 00000001, 00B06F38, 00A510E8)
001A41B8  0041D81B  (001A77F0, 00000000, 00000001, 00000000)
0022CB98  0040C814  (0022CBC0, 00912930, 00686FB0, 004011BF)
0022CCA8  00401238  (00000003, 00912930, 00910090, 60030000)
0022CD98  61006198  (00000000, 0022CDD0, 61005510, 0022CDD0)
61005510  61004416  (0000009C, A02404C7, E8611001, FFFFFF48)
823515 [main] gdtif 3800 _cygtls::handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
838259 [main] gdtif 3800 _cygtls::handle_exceptions: Error while dumping state (probably corrupted stack)
Thank you very much for your help!
-David


 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]