View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000545 | file | General | public | 2024-07-22 19:16 | 2024-07-22 19:16 |
Reporter | luigisemenzato | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 5.44 | ||||
Summary | 0000545: /bin/dash script is confused for C source | ||||
Description | The ChromeOS build can fail when it includes a shell script with #! /bin/dash in its first line. This happens because dash is not in the list of known shells, so file ignores the #! line, and instead finds a line containing "main() {" which is valid shell, but also valid C. I suggest two fixes: 1. Include dash in the list of known shells (hopefully this is not controversial). 2. Using an interpreter that compiles and runs a C source seems pretty unusual (but not impossible: #!/usr/bin/tcc -run) and I am wondering if this would deserve deeper analysis, i.e if the interpreter executable ends in "sh" treat it as a script even if it contains "main () {". In fact, it may be better to call such a file a "script" rather than C source whenever its first line starts with #!. But I realize this might break existing code. Thanks! | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2024-07-22 19:16 | luigisemenzato | New Issue |