Skip to content

Fix runtime error inside m3quake QScanner#1024

Open
VictorMiasnikov wants to merge 1 commit intomodula3:masterfrom
VictorMiasnikov:d5.11.9-ZZYYXX-20220414_17-32__m3quake__QScanner
Open

Fix runtime error inside m3quake QScanner#1024
VictorMiasnikov wants to merge 1 commit intomodula3:masterfrom
VictorMiasnikov:d5.11.9-ZZYYXX-20220414_17-32__m3quake__QScanner

Conversation

@VictorMiasnikov
Copy link
Copy Markdown
Contributor

Fix runtime error inside m3quake QScanner

...


*** runtime error:
*** An enumeration or subrange value was out of range.
*** file "../src/QScanner.m3", line 49


*** execution of [<function _BuildGlobalFunction at 0x0000000002F2DD68>, <function _ShipFunction at 0x0000000002F2DDD8>] failed ***
...

...
t.buflen := M3File.Read (f, t.buffer^, size); (* VVM: it is line 49 *)
...

Fix runtime error inside m3quake QScanner

...
***
*** runtime error:
***    An enumeration or subrange value was out of range.
***    file "../src/QScanner.m3", line 49
***
 
 *** execution of [<function _BuildGlobalFunction at 0x0000000002F2DD68>, <function _ShipFunction at 0x0000000002F2DDD8>] failed ***
...
 
...
      t.buflen := M3File.Read (f, t.buffer^, size);    (* VVM: it is line 49  *)
...
@jaykrell
Copy link
Copy Markdown
Contributor

jaykrell commented Apr 19, 2022

Are you sure you have everything up to date?
It seems like you are hitting things I already fixed, like the slashes (long ago, not today).
In this case, the problem I hit months ago when first running DJGPP is that stat.size does not account for text conversion (\r\n to \n) and reading does, so the sizes would mismatch. Open should always be binary. I thought I made it so. Maybe I missed some.
I don't think this is the right fix.
The right fix is to always open binary.
I agree it is wonky, the entire text mode feature of stdio.

Comment thread m3-sys/m3quake/src/QScanner.m3 Outdated
@VictorMiasnikov
Copy link
Copy Markdown
Contributor Author

VictorMiasnikov commented Apr 19, 2022 via email

@VictorMiasnikov
Copy link
Copy Markdown
Contributor Author

VictorMiasnikov commented Apr 19, 2022 via email

@jaykrell
Copy link
Copy Markdown
Contributor

@VictorMiasnikov this can be closed now right?

@VictorMiasnikov
Copy link
Copy Markdown
Contributor Author

VictorMiasnikov commented May 24, 2022

@VictorMiasnikov this can be closed now right?

This patch ( in any key) is part of:
https://github.com/VictorMiasnikov/cm3/releases/tag/d5.11.9-ZZYYXX-20220208_13-48

Nothing terrible happened with:
AMD64_LINUX
AMD64_MINGW
I386_DJGPP ( DOS)
AMD64_NT
I386_NT

But this patch is not be "a way to real solving of problem" ;-(

@VictorMiasnikov
Copy link
Copy Markdown
Contributor Author

It is actual

@jaykrell
Copy link
Copy Markdown
Contributor

jaykrell commented May 7, 2026

How is the error produced?

@jaykrell
Copy link
Copy Markdown
Contributor

jaykrell commented May 7, 2026

We need to stop with manual releases at this point, and stick to automation.
There's been too many supply chain attacks in the larger world. Sorry.

@VictorMiasnikov
Copy link
Copy Markdown
Contributor Author

VictorMiasnikov commented May 7, 2026 via email

@VictorMiasnikov
Copy link
Copy Markdown
Contributor Author

VictorMiasnikov commented May 7, 2026 via email

@VictorMiasnikov
Copy link
Copy Markdown
Contributor Author

VictorMiasnikov commented May 7, 2026 via email

@VictorMiasnikov
Copy link
Copy Markdown
Contributor Author

AI / LLM understand You right?

(
} uploaded files to a server "by hand" (from their personal computer).

What exactly named files I upload to PR 1024 ?
)

Translation of the Quote:

"At this point, we need to stop doing manual releases and stick to automation. There have been too many supply chain attacks in the wider world recently. Sorry."


Explanation of the Meaning

This message was written by a developer or project manager explaining a change in the software release process. Here are the key points:

1. Stopping Manual Work ("manual releases")
Previously, the developer likely ran scripts or uploaded files to a server "by hand" (from their personal computer). While this is convenient for small fixes, it is risky.

2. Why Automation is Needed ("stick to automation")
Automation (usually via CI/CD pipelines) means that the process of building and deploying the software happens on a special, isolated server according to a pre-configured algorithm. This eliminates the "human factor" and prevents situations where attackers could compromise a developer's personal computer.

3. Supply Chain Attacks ("supply chain attacks")
This is the main reason for the decision.

  • What it is: Attacks where hackers don't crack the final program code directly, but instead inject malicious code during the build process, via dependencies (libraries), or by replacing update files.
  • Context: In recent years, there have been several high-profile incidents (e.g., the SolarWinds hack, incidents with npm or Python packages) where hackers injected viruses into legitimate software updates.
  • The Connection: Manual releases often require access permissions that are hard to control, or they use signing keys stored on personal machines. Automated systems are safer because they can be strictly configured to verify digital signatures and code integrity before release.

4. "Sorry"
The author is apologizing because this change will likely cause inconvenience. The release process may now become more formal, slower, or more complex for colleagues/users who are used to quick "manual" responses, but security is now the priority.

Short Summary:
"We will no longer release updates manually because it is dangerous — hackers are increasingly attacking development processes. Now only a robot/server will do this so that no one can tamper with the code. Sorry for the inconvenience."

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants