| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
|---|---|---|---|---|---|---|---|---|---|
| 0000342 | mercury | Bug | public | 2014-06-24 16:03 | 2014-06-25 16:39 | ||||
| Reporter | juliensf | ||||||||
| Assigned To | juliensf | ||||||||
| Priority | urgent | Severity | major | Reproducibility | always | ||||
| Status | resolved | Resolution | fixed | ||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0000342: string.format broken in non-C grades | ||||||||
| Description | The attached program should print "16.0"; when using the Mercury implementation of format (i.e when using_sprintf returns false), it prints "10.0". This affects all of the non-C backends. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files |
| ||||||||
Notes |
|
|
juliensf (administrator) 2014-06-24 16:05 |
This is derived from tests/general/float_test and appears to be the reason for the failure of that test with non-C backends. |
|
juliensf (administrator) 2014-06-24 16:14 |
The strings above should be "16" and "10" respectively. |
|
wangp (developer) 2014-06-24 16:31 |
At least part of the bug can be attributed to commit b1af59cb29ac31db9fc5b3422fced505facabad1 where the replacement of string.substring was replaced by string.between incorrectly. |
|
juliensf (administrator) 2014-06-24 16:54 |
Yes, that commit introduced an off-by-one error at string.m:4038. Fixing that fixes the problem. I'll commit a fix after I run some further tests to see if anything else is broken. |
|
juliensf (administrator) 2014-06-25 16:39 |
Fix committed. |
Issue History |
|||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2014-06-24 16:03 | juliensf | New Issue | |
| 2014-06-24 16:03 | juliensf | File Added: fmt_bug.m | |
| 2014-06-24 16:05 | juliensf | Note Added: 0000706 | |
| 2014-06-24 16:14 | juliensf | Note Added: 0000707 | |
| 2014-06-24 16:31 | wangp | Note Added: 0000708 | |
| 2014-06-24 16:54 | juliensf | Note Added: 0000709 | |
| 2014-06-25 16:39 | juliensf | Note Added: 0000710 | |
| 2014-06-25 16:39 | juliensf | Status | new => resolved |
| 2014-06-25 16:39 | juliensf | Resolution | open => fixed |
| 2014-06-25 16:39 | juliensf | Assigned To | => juliensf |


