nodejs/node · error
%s:%d: Fixup failed by %s\n
Error message
%s:%d: Fixup failed by %s\n
What it means
convert()'s main loop calls fixLine() per input line; if any line returns true (error), control jumps to the fail label, closes the output stream, prints this summary message naming the input file, line number, and program, deletes the partial output via cleanup(), and returns 1. It is a generic wrapper for all per-line fixup failures (741-745).
Source
Thrown at deps/icu-small/source/tools/escapesrc/escapesrc.cpp:407
// TODO: any platform variations of #line?
outf << "#line 1 \"" << infile << "\"" << '\n';
int no = 0;
std::string linestr;
while( getline( inf, linestr)) {
no++;
if(fixLine(no, linestr)) {
goto fail;
}
outf << linestr << '\n';
}
if(inf.eof()) {
return 0;
}
fail:
outf.close();
fprintf(stderr, "%s:%d: Fixup failed by %s\n", infile.c_str(), no, prog.c_str());
cleanup(outfile);
return 1;
}
/**
* Main function
*/
int main(int argc, const char *argv[]) {
prog = argv[0];
if(argc != 3) {
usage();
return 1;
}
std::string infile = argv[1];
std::string outfile = argv[2];
View on GitHub (pinned to 1b2de5e052)
Solutions
- Read the specific line number reported (no) in the input file and apply the fix corresponding to the underlying 741-745 error.
- Re-run with verbose output to see which sub-error fired immediately before this summary.
- If the construct is legitimate, exclude the file from the escapesrc pass or preprocess it.
Defensive patterns
Strategy: fallback
Validate before calling
// after invoking escapesrc, inspect exit code and the per-line message
rc = subprocess.run([...], capture_output=True)
if rc.returncode != 0:
line = re.search(r':(\d+):', rc.stderr.decode()) # parse the failing line
raise RuntimeError(f'escapesrc failed on line {line.group(1) if line else "?"}: {rc.stderr.decode()}') Prevention
- Treat any non-zero escapesrc exit as fatal; its output is deleted so partial results never propagate.
- Echo escapesrc's stderr verbatim into the build log to speed root-cause of the underlying 741-745 error.
When it happens
Trigger: Any fixLine() call returns true — i.e. one of the line-level errors (illegal code point, bad quote, u8'...' rejection, illegal UTF-8, etc.) occurred on line `no` of the input. The message reports the first such failing line.
Common situations: Feeding a source file containing a construct escapesrc cannot handle (see 741-745); an upstream code change introduced an unsupported literal; the input file is not actually the kind of C/C++ source escapesrc expects.
Related errors
- %s: usage: %s infile.cpp outfile.cpp
- Illegal code point U+%X\n
- Not a 'u'?
- Quote is '%c' - not sure what to do.\n
- Cannot do u8'...'\n
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/0a73acc2d5ca1fd0.
Report an issue: GitHub.