Skip to content

<fileioc.h> ti_Write Crash #461

@vitalash1

Description

@vitalash1

On OS 5.4.0.0034 this program consistently crashes with my reproduction steps involving filling the RAM.

#include <fileioc.h>
#include <stdint.h>

#define size_to_write 37924
uint8_t data[size_to_write];

int main() {
    uint8_t handle = ti_OpenVar("BUGVAR", "w", OS_TYPE_PRGM);
    ti_Write(data, 1, size_to_write, handle);
    ti_Close(handle);
    return 0;
}

NVIDIA_Share_pCSUARrJuu

My CEMU version is
image

Reproduction Steps

  • Reload ROM on TI-OS 5.4.0.0034 (Untested with other OS versions.) Here's a rom for use with CEMU
  • Compile the above program (my compiled version of it is AETHER.8xp in the following provided .zip file)
  • Download "BugPack.zip" and put "clibs.8xg", "WALDATA1.8xp", and "WALDATA3.8xp" into RAM. As well as that, put in the bug-reproducing program whose code is shown above (pre-compiled as AETHER.8xp inside the zip)
    BugPack.zip
  • There should be ~56,000 RAM free. Now, run the compiled reproduction program and note a crash on ti_Write (any code past ti_Write will not be executed I believe, from testing with dbg_printf earlier)

If you do not specifically fill the ram with the provided programs WALDATA1.8xp, WALDATA3.8xp, and clibs.8xg, then the crash will not occur.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions