View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0000468 | mercury | Bug | public | 2018-08-19 13:05 | 2018-09-03 12:29 | ||||
Reporter | wangp | ||||||||
Assigned To | zs | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000468: free argument packed with other argument uses uninitialised variable | ||||||||
Description | In high-level C grades, the goal from packed_arg_partial_inst.m X = struct(42, _, yes, orange, _, _, _), compiles to { MR_Word TypeCtorInfo_13_13; MR_Integer Var_10; MR_Word Var_11; MR_Word Var_12; MR_Word Var_6; MR_Word Var_7; MR_Word Var_8; MR_String Var_9; Var_10 = (MR_Integer) 42; Var_11 = (MR_Integer) 1; Var_12 = (MR_Integer) 2; { MR_Word base; base = (MR_Word) MR_new_object(MR_Word, ((MR_Integer) 3 * sizeof(MR_Word)), NULL, NULL); (env_ptr)->packed_arg_partial_inst__foo_2_p_0_env_0__X_5 = base; MR_hl_field(MR_mktag(0), base, 0) = ((MR_Box) (Var_10)); MR_hl_field(MR_mktag(0), base, 1) = (MR_Box) (((((MR_Unsigned) (Var_6) << (MR_Integer) 6)) | (((((MR_Unsigned) (Var_11) << (MR_Integer) 5)) | (((((MR_Unsigned) (Var_12) << (MR_Integer) 3)) | (((((MR_Unsigned) (Var_7) << (MR_Integer) 2)) | (MR_Unsigned) (Var_8))))))))); MR_hl_field(MR_mktag(0), base, 2) = NULL; } where Var_6, Var_7, Var_8 are used without being initialised. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files |
|
Notes | |
zs (developer) 2018-08-19 15:24 |
I am working on a change that involves that code anyway. |
zs (developer) 2018-09-03 12:29 |
Fix committed 2018 sep 3. |
Issue History | |||
Date Modified | Username | Field | Change |
---|---|---|---|
2018-08-19 13:05 | wangp | New Issue | |
2018-08-19 15:22 | zs | Assigned To | => zs |
2018-08-19 15:22 | zs | Status | new => assigned |
2018-08-19 15:24 | zs | Note Added: 0001008 | |
2018-09-03 12:29 | zs | Status | assigned => resolved |
2018-09-03 12:29 | zs | Resolution | open => fixed |
2018-09-03 12:29 | zs | Note Added: 0001009 |