View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000545 | file | General | public | 2024-07-22 19:16 | 2024-11-10 16:55 |
Reporter | luigisemenzato | Assigned To | christos | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 5.44 | ||||
Fixed in Version | HEAD | ||||
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 | |
2024-11-10 16:55 | christos | Assigned To | => christos |
2024-11-10 16:55 | christos | Status | new => assigned |
2024-11-10 16:55 | christos | Status | assigned => resolved |
2024-11-10 16:55 | christos | Resolution | open => fixed |
2024-11-10 16:55 | christos | Fixed in Version | => HEAD |
2024-11-10 16:55 | christos | Note Added: 0004096 |