| Anonymous | Login | Signup for a new account | 2013-05-18 21:04 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0005761 | OCaml | OCaml otherlibs | public | 2012-09-18 21:12 | 2012-10-07 08:55 | |||||||
| Reporter | vouillon | |||||||||||
| Assigned To | xleroy | |||||||||||
| Priority | high | Severity | major | Reproducibility | always | |||||||
| Status | resolved | Resolution | fixed | |||||||||
| Platform | OS | Mac OS X | OS Version | |||||||||
| Product Version | 4.00.0 | |||||||||||
| Target Version | 4.00.1+dev | Fixed in Version | 4.00.1+dev | |||||||||
| Summary | 0005761: Incorrect bigarray custom block size | |||||||||||
| Description | The fix to issue 0005516 introduced a bug. The size of bigarray custom blocks is computed as follows: sizeof(struct caml_ba_array) + (num_dims - 1) * sizeof(intnat) (in functions caml_ba_alloc and caml_ba_deserialize). This is too small by one when a C99's flexible array type is used: #if (__STDC_VERSION__ >= 199901L) intnat dim[] /*[num_dims]*/; /* Size in each dimension */ #else intnat dim[1] /*[num_dims]*/; /* Size in each dimension */ #endif | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
(0008107) vouillon (reporter) 2012-09-19 10:37 |
In fact, only serialization is affected. I have uploaded a fix. But maybe we should use offsetof rather than conditional directives? offsetof(struct caml_ba_array, dim) + num_dims * sizeof(intnat) |
|
(0008172) doligez (manager) 2012-09-27 17:57 edited on: 2012-09-27 17:59 |
patch applied in 4.00.1+dev (r 12963) and trunk (r 12964) Left as "resolved" (instead of closed) because Xavier wants to do some refactoring on this code. |
|
(0008216) xleroy (administrator) 2012-10-07 08:55 |
Refactoring of this code in the trunk, commit 12993. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-09-18 21:12 | vouillon | New Issue | |
| 2012-09-19 10:34 | vouillon | File Added: patch.txt | |
| 2012-09-19 10:37 | vouillon | Note Added: 0008107 | |
| 2012-09-27 16:36 | xleroy | Status | new => acknowledged |
| 2012-09-27 16:36 | xleroy | Target Version | => 4.00.1+dev |
| 2012-09-27 17:57 | doligez | Note Added: 0008172 | |
| 2012-09-27 17:57 | doligez | Assigned To | => xleroy |
| 2012-09-27 17:57 | doligez | Status | acknowledged => resolved |
| 2012-09-27 17:57 | doligez | Resolution | open => fixed |
| 2012-09-27 17:57 | doligez | Relationship added | related to 0005516 |
| 2012-09-27 17:59 | doligez | Note Edited: 0008172 | View Revisions |
| 2012-10-07 08:55 | xleroy | Note Added: 0008216 | |
| 2012-10-07 08:55 | xleroy | Fixed in Version | => 4.00.1+dev |
| Copyright © 2000 - 2011 MantisBT Group |