| Summary: | setting Text.isLoaded to true causes Diags_setMask() to access random memory | ||
|---|---|---|---|
| Product: | [Technology] RTSC | Reporter: | Dave Russo <d-russo> |
| Component: | Tools | Assignee: | Dave Russo <d-russo> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | critical | ||
| Priority: | P3 | CC: | cring, karl, sascha |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | target:3.20.05,3.21 | ||
fixed in 3.21 stream (r1198) should probably be propagated to 3.20 as well. fixed in 3.20 stream (r1210) When building the example runtime.assert with 3.21.00.19 for native Linux, the built executable fails with a segmentation fault. With 3.21.00.24, the executable runs to the completion succesfully. However, the changes I had to make were little bit different than proposed in the first comment. I had to change a module other than Main. System.common$.namedModule = true; System.common$.diags_INTERNAL = Diags.RUNTIME_OFF; With Main, both executables ran fine. When building the example runtime.assert with 3.21.00.19 for native Linux, the built executable fails with a segmentation fault. With 3.21.00.24, the executable runs to the completion succesfully. However, the changes I had to make were little bit different than proposed in the first comment. I had to change a module other than Main. System.common$.namedModule = true; System.common$.diags_INTERNAL = Diags.RUNTIME_OFF; With Main, both executables ran fine. The bug is not fixed yet in 3.20.05 stream because the latest xdc-v52 was released before the fix was committed to the repository. We need another xdc-v. Verified that 3.20.05.74 causes a segmentation error for the given example, while 3.20.05.75 runs correctly to the completion. Verified that 3.20.05.74 causes a segmentation error for the given example, while 3.20.05.75 runs correctly to the completion. Shipped in XDCtools 3.21 |
Diags_setMask() calls Text_matchRope(), but Text_matchRope() is undefined if Text.isLoaded is true. On systems that have memory protection the following configuration will cause segmentation faults (depending on the exact placement of xdc.noload) id Diags_setmask() is called: var Diags = xdc.useModule("xdc.runtime.Diags"); var Main = xdc.useModule("xdc.runtime.Main"); /* unnamed modules can not be enabled/disabled at runtime */ Main.common$.namedModule = true; /* if text is not loaded, Diags setMask() can't work */ var Text = xdc.useModule("xdc.runtime.Text"); Text.isLoaded = false;