Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006630OCaml~DO NOT USE (was: OCaml general)public2014-10-27 10:522016-12-07 11:49
Reporterglondu 
Assigned Toshinwell 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version4.02.1 
Target Version4.02.2+dev / +rc1Fixed in Version4.02.2+dev / +rc1 
Summary0006630: Failure of tests/prim-bigstring/{big,}string.ml on big-endian architectures
DescriptionThe aforementioned tests fail (at least) on powerpc and s390x (which are big-endian). The diff makes me think about an endianness issue.
Additional Information$ wdiff testsuite/tests/prim-bigstring/string_access.{reference,result}
1234 [-12-] {+3400+} 0
fedc [-fe-] {+dc00+} 0
12345678 [-123456 1234-] {+34567800 56780000+}
fedcba09 [-fedcba fedc-] {+dcba0900 ba090000+}
1234567890abcdef [-1234567890abcd 1234567890ab-] {+34567890abcdef00 567890abcdef0000+}
fedcba0987654321 [-fedcba09876543 fedcba098765-] {+dcba098765432100 ba09876543210000+}
$ wdiff testsuite/tests/prim-bigstring/bigstring_access.{reference,result}
1234 [-12-] {+3400+} 0
fedc [-fe-] {+dc00+} 0
12345678 [-123456 1234-] {+34567800 56780000+}
fedcba09 [-fedcba fedc-] {+dcba0900 ba090000+}
1234567890abcdef [-1234567890abcd 1234567890ab-] {+34567890abcdef00 567890abcdef0000+}
fedcba0987654321 [-fedcba09876543 fedcba098765-] {+dcba098765432100 ba09876543210000+}
Tagspatch
Attached Filespatch file icon 0001-fix-bigstring-access-on-big-endian-architectures.patch [^] (7,000 bytes) 2015-05-07 11:59 [Show Content]

- Relationships

-  Notes
(0012446)
glondu (reporter)
2014-10-27 19:17

After a deeper look, the testcase is faulty here: it assumes the caml_*string_getN primitives are portable. Looking at their C implementation, they are not.
(0013334)
cwsolee (reporter)
2015-02-24 19:07

I find the same problem with RHEL 7 on zLinux, roughly when will this be resolved? Or if dev branch has the fix, I could give it a try too.
(0013860)
chambart (developer)
2015-05-07 12:00

I uploaded a patch, but couldn't test it on big-endian architectures.
(0013861)
shinwell (developer)
2015-05-07 14:45

I will try to do it
(0013950)
shinwell (developer)
2015-05-19 12:27
edited on: 2015-05-19 12:28

I agree that the testsuite seems at fault, since it's the one doing the offsetting into the bigstring.

Tested on a big-endian POWER7 Linux system (which of course is currently only supported by OCaml in a 32-bit environment).

Also tested on x86-64 Linux.

Committed to 4.02.


- Issue History
Date Modified Username Field Change
2014-10-27 10:52 glondu New Issue
2014-10-27 19:17 glondu Note Added: 0012446
2014-10-31 21:08 chambart Assigned To => chambart
2014-10-31 21:08 chambart Status new => assigned
2015-01-10 01:07 doligez Target Version => 4.02.2+dev / +rc1
2015-02-24 19:07 cwsolee Note Added: 0013334
2015-05-07 11:59 chambart File Added: 0001-fix-bigstring-access-on-big-endian-architectures.patch
2015-05-07 12:00 chambart Note Added: 0013860
2015-05-07 12:04 chambart Tag Attached: patch
2015-05-07 14:45 shinwell Note Added: 0013861
2015-05-07 18:14 shinwell Assigned To chambart => shinwell
2015-05-19 12:27 shinwell Note Added: 0013950
2015-05-19 12:28 shinwell Note Edited: 0013950 View Revisions
2015-05-19 12:28 shinwell Status assigned => resolved
2015-05-19 12:28 shinwell Fixed in Version => 4.02.2+dev / +rc1
2015-05-19 12:28 shinwell Resolution open => fixed
2016-12-07 11:49 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker