<< Back to previous view

[PCC-17] Integer (and possibly fp) overflows testing Tcl. Created: 05/Jan/09  Updated: 08/Jul/16

Status: Open
Project: pcc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Stuart Cassoff Assignee: Unassigned
Resolution: Unresolved Votes: 0
Environment: Building the Tcl 8.5 port.

File Attachments: File headers.c    

To reproduce, add to ports/lang/tcl/8.5/Makefile:
Make sure ulimit -s == 8192, or some large enough number to prevent stopping.
$ make regress

Comment by Gregory McGarry [ 23/Jan/09 10:25 PM ]
Which operating system is this?

It occurred to me that if your system is using the header files from the libpcc library, then there may be incompatibilities which could cause problems.

I will write a test program where we can verify that the headers are correct.

Comment by Gregory McGarry [ 24/Jan/09 01:19 AM ]
Here's the file from pcc-test module.

Comment by Volkmar Klatt [ 10/Aug/14 03:40 PM ]
concerning floating point:
The very good diagnostic program paranoia.c (http://www.netlib.org/paranoia/paranoia.c) reveales:
"Sticky bit used incorrectly or not at all."
Maybe this is the cause of the floating point issues?

output from paranoia:

Checking rounding on multiply, divide and add/subtract.
* is neither chopped nor correctly rounded.
/ is neither chopped nor correctly rounded.
Addition/Subtraction neither rounds nor chops.
Sticky bit used incorrectly or not at all.
FLAW: lack(s) of guard digits or failure(s) to correctly round or chop
(noted above) count as one flaw in the final tally below.

(note: on my linux, <stdlib.h> is broken,
as it does not include the necessary <inttypes.h>
so I have to include it explicit to compile paranoia)
Comment by Brian Callahan [ 08/Jul/16 09:14 PM ]
I know because I recognize the reporter name and other context clues in the original report that this is OpenBSD being talked about.

Unfortunately, pcc fails to compile Tcl on OpenBSD so I can't check it.

But I did check paranoia on OpenBSD/amd64 and OpenBSD/i386. OpenBSD/amd64 passes the paranoia tests 100% when compiled with pcc with and without -O. paranoia still complains about the sticky bit when compiled with pcc on OpenBSD/i386.

However, that doesn't really tell the whole story. On OpenBSD/i386, pcc actually does better than gcc and clang running paranoia. gcc at -O0 is just as good as pcc. However, when gcc is set to anything above -O0, it produces 3 FAILURES, 4 SERIOUS DEFECTs, 3 DEFECTs, and 2 FLAWs (the sticky bit being one of those FLAWs). clang does worse: it's 2, 4, 5, 1 using clang -O0 and 3, 4, 2, 2 using clang -O.

Makes me wonder what other i386 operating systems end up with under this test.
Generated at Sun Oct 23 18:10:15 CEST 2016 using JIRA Enterprise Edition, Version: 3.13.1-#333.