Opened 8 years ago

Closed 8 years ago

#775 closed bug (need more information)

Segfaults when not in batch mode and stdin is not a tty

Reported by: infinity0@… Owned by: somebody
Priority: minor Milestone: 4-1-0 and higher
Component: dontKnow Version: 4-0-3
Keywords: Cc:

Description

$ Singular -b -v | head -n1
Singular for x86_64-Linux version 4.0.3 (4033, 64 bit) Oct  9 2016 11:47:58 #debian-4.0.3-p3+ds-1

$ echo '12345*54321;' | Singular 
[ banner ]
670592745
> *** buffer overflow detected ***: Singular terminated
======= Backtrace: =========
[etc]
Singular : signal 6 (v: 4033):
current line:>>12345*54321;<<
Segment fault/Bus error occurred at 6 because of 246 (r:1476226264)
please inform the authors
trying to restart...
fatal flex scanner internal error--end of buffer missed
# exit code 2

$ Singular  </dev/null
[ same as above, ofc without 670592745 ]

$ echo '12345*54321;' | Singular -b
[ banner ]
670592745
# exit code 0

$ Singular -b </dev/null
[ banner ]
# exit code 0

At the very least it should not segfault without -b.

Change History (1)

comment:1 Changed 8 years ago by hannes

Resolution: need more information
Status: newclosed

Behavior of -b fixed (see http://www.singular.uni-kl.de/Manual/4-0-3/sing_19.htm) (use Singular -t for use as a filter) and additional checks for unusual tty configurationons: 65041c37c85b75c253d15d685bb4a616a0e7f1c0, 54d5229170cefd9fd9156ac39f061d309f193b57

But this is pure guessing as I cannot reproduce the error: Possible is:

  • /dev/tty does not exist or is not a terminal
  • libreadline.* exists, but readline.h not
  • configure fails to detect readline, but libreadline.so can be loaded
  • isatty returns true, but ttyname returns NULL
Note: See TracTickets for help on using tickets.