Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<fileioc.h> ti_Write Crash #461

Closed
vitalash1 opened this issue Nov 20, 2023 · 2 comments
Closed

<fileioc.h> ti_Write Crash #461

vitalash1 opened this issue Nov 20, 2023 · 2 comments
Assignees

Comments

@vitalash1
Copy link

vitalash1 commented Nov 20, 2023

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.

@mateoconlechuga
Copy link
Member

thank you for this excellent bug report, I'll look into it tonight :)

@mateoconlechuga
Copy link
Member

Fixed, new libraries can be downloaded from the nightly page within the hour.

A new library release should be available within the next week or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants