Skip to content

Fixed-Size Source Buffer (1024 bytes) #12

@SAMBA8695

Description

@SAMBA8695

Description

The compiler currently reads the input source file into a fixed-size buffer:

char input[1024];

If the source file exceeds 1023 bytes, the input is silently truncated. No error or warning is reported to the user.

This can lead to incomplete tokenization, invalid parsing results, and unpredictable compiler behavior.

Current Behavior

  • Source file size is limited to 1023 bytes
  • Larger files are silently truncated
  • Remaining input is ignored
  • No error message is produced

Expected Behavior

  • Compiler should support arbitrarily sized source files
  • Input buffer should grow dynamically as needed
  • Alternatively, an explicit error should be reported for oversized input

Suggested Direction

  • Read the file dynamically using fseek / ftell
  • Or read incrementally using a growing buffer
  • Avoid fixed-size limits in source loading

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions