On 4/17/2020 2:46 PM, Brian Inglis wrote:
Try running under strace:
$ strace -o prog.strace prog -options... args...
or gdb:
$ gdb prog
(gdb) run -options... args...
SEGV diagnostics
(gdb) bt
(gdb) q
and attach or paste all output.
The following is the case where I got an error message. Not actually a
segfault. (Sorry, I'm not a programmer.) The executable, gdb, and strace
all produce the same output:
-----------
At line 889 of file cgcrez.f (unit = 6, file = 'stdout')
Fortran runtime error: Missing initial left parenthesis in format
^
Error termination. Backtrace:
#0 0xffffffffffffffff in ???
#1 0xffffffffffffffff in ???
#2 0xffffffffffffffff in ???
#3 0xffffffffffffffff in ???
#4 0xffffffffffffffff in ???
#5 0xffffffffffffffff in ???
#6 0xffffffffffffffff in ???
#7 0xffffffffffffffff in ???
#8 0xffffffffffffffff in ???
#9 0xffffffffffffffff in ???
#10 0xffffffffffffffff in ???
#11 0xffffffffffffffff in ???
#12 0xffffffffffffffff in ???
#13 0xffffffffffffffff in ???
--------------
Here is the indicated line, using list mode in vim to show that there
are no unexpected nonprinting characters:
887 write(6,'(i6,1p3e9.2,x,e9.2,x,0pf6.3,x,1p2e10.2,''@'')')$
888 & iter, reldf,reldb,$
889 & gnorms, x1min, -cosag, beta(1),beta(np)$
890 $
This code compiled and ran on cygwin in the past, and checks out now in
debian stable.
In my other case, which I may or may not be able to find again, the
program failed with no explicit error message like the one above.
Stepping through with gdb showed that it was also crashing in a valid
write statement.
--
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