Skip to content

Unable to bootstrap due to corrupted libc.inc #141

@ChAoSUnItY

Description

@ChAoSUnItY

In the latest commit (cb34939), after using command make distclean config ARCH=arm then executes make to bootstrap, the process panicks about the corrupted libc.inc generated by tools/inliner.c. The generated corrupted libc.inc could be seen here.

Here's the sneak peek of the corrupted libc.inc, notice that this corruption is caused due to unmatched string double quotation mark:

/* Created by tools/inliner - DO NOT EDIT. */
void __c(char *src) {
    for (int i = 0; src[i]; i++)
        SOURCE[source_idx++] = src[i];
}
void libc_generate() {
  __c("/*
\n");
  __c(" * shecc - Self-Hosting and Educational C Compiler.
\n");
  __c(" *
\n");
  __c(" * shecc is freely redistributable under the BSD 2 clause license. See the
\n");
  __c(" * file \"LICENSE\" for information on usage and redistribution of this file.
\n");
  __c(" */
\n");
  __c("
\n");

I can only reproduce this result on current laptop's WSL2 but on previous desktop's WSL2.

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