Issue Details (XML | Word | Printable)

Key: PCC-17
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Stuart Cassoff
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

Integer (and possibly fp) overflows testing Tcl.

Created: 05/Jan/09 02:22 AM   Updated: 08/Jul/16 09:15 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File headers.c (3 kB)

Environment: Building the Tcl 8.5 port.

 Description  « Hide
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

 All   Comments   Change History      Sort Order: Descending order - Click to sort in ascending order
Brian Callahan added a comment - 08/Jul/16 09:14 PM - edited
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.

Volkmar Klatt added a comment - 10/Aug/14 03:40 PM
concerning floating point:
The very good diagnostic program 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)

Gregory McGarry added a comment - 24/Jan/09 01:19 AM
Here's the file from pcc-test module.

Gregory McGarry added a comment - 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.