Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006164OCamlOCaml otherlibspublic2013-09-06 14:462013-09-11 18:09
Reporterkanig 
Assigned Tolefessan 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Platformx86_64OSlinuxOS VersionDebian 3.2.35-2
Product Version4.01.0+beta/+rc 
Target VersionFixed in Version4.00.1 
Summary0006164: segmentation fault on Num.power_num
DescriptionThe attached file produces a segfault both in bytecode and native format. Note that the platform is important: it happens on x86_64, and I have only seen it on linux.

I have reproduced this in 3.12.1, 4.00.1 and 4.01.0rc.
Steps To Reproduceocamlbuild -lib nums numbug.ml
./numbug.native
Additional Informationgdb locates the crash in "bng_amd64_mult_add_digit".
TagsNo tags attached.
Attached Files? file icon numbug.ml [^] (216 bytes) 2013-09-06 14:46 [Show Content]

- Relationships

-  Notes
(0010321)
lefessan (developer)
2013-09-07 09:12

Fixed in commit r14074.

There is a buffer overflow in Nat.make_power_base when base=0 or 1. This case can only be triggered in Nat.power_base_int, so I added a test there for base=0 or 1.
(0010326)
kanig (reporter)
2013-09-09 09:59

Thank you, that was quick! I have a couple of questions though ... :-)

Can you tell me if the fix will be in 4.01?

Is it possible to workaround this problem, e.g. by avoiding calls with certain arguments to Num.power_num?

Thanks in advance.
(0010336)
doligez (administrator)
2013-09-11 15:40

This fix will be in 4.01.0.
(0010337)
kanig (reporter)
2013-09-11 18:09

That's great, thank you.

- Issue History
Date Modified Username Field Change
2013-09-06 14:46 kanig New Issue
2013-09-06 14:46 kanig File Added: numbug.ml
2013-09-07 09:12 lefessan Note Added: 0010321
2013-09-07 09:12 lefessan Status new => resolved
2013-09-07 09:12 lefessan Fixed in Version => 4.00.1
2013-09-07 09:12 lefessan Resolution open => fixed
2013-09-07 09:12 lefessan Assigned To => lefessan
2013-09-09 09:59 kanig Note Added: 0010326
2013-09-11 15:40 doligez Note Added: 0010336
2013-09-11 18:09 kanig Note Added: 0010337


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker