Closed Bug 1070042 Opened 5 years ago Closed 5 years ago

mach crashtest --debugger fails when debugger path contains unusual characters

Categories

(Firefox Build System :: General, defect)

x86_64
Windows 7
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla35

People

(Reporter: aklotz, Assigned: aklotz)

References

Details

Attachments

(1 file)

I'm on Windows and I don't have my preferred debugger on my PATH (I have my reasons!).

When I run:

./mach crashtest --debugger="/c/Program Files (x86)/Microsoft SDKs/Windows/v8.1/Debuggers/x86/windbg.exe"

I get this:

mozmake.EXE: Entering directory 'c:/Users/aklotz/src/m-c/obj-ff-prof-dbg'
C:/Users/aklotz/AppData/Local/Temp/make77900-2.sh: line 1: syntax error near unexpected token `('
C:/Users/aklotz/AppData/Local/Temp/make77900-2.sh: line 1: `rm -f ./crashtest.log && c:/Users/aklotz/src/m-c/obj-ff-prof-dbg/_virtualenv/Scripts/python.exe _tests/reftest/runreftest.py --extra-profile-file=dist/plugins --symbols-path=dist/crashreporter-symbols  --debugger=c:/Program Files (x86)/Microsoft SDKs/Windows/v8.1/Debuggers/x86/windbg.exe 'c:/Users/aklotz/src/m-c/testing/crashtest/crashtests.list' | tee ./crashtest.log'
c:/Users/aklotz/src/m-c/testing/testsuite-targets.mk:270: recipe for target 'crashtest' failed
mozmake.EXE: *** [crashtest] Error 258
mozmake.EXE: Leaving directory 'c:/Users/aklotz/src/m-c/obj-ff-prof-dbg'

It looks like the generated shell script does not do any quoting or escaping of the --debugger parameter.
Attached patch FixSplinter Review
Looks like there was also some additional fallout from bug 928397.
Assignee: nobody → aklotz
Status: NEW → ASSIGNED
Attachment #8492309 - Flags: review?(ted)
Comment on attachment 8492309 [details] [diff] [review]
Fix

Review of attachment 8492309 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/tools/reftest/mach_commands.py
@@ +254,5 @@
>  
>          pass_thru = False
>  
>          if debugger:
> +            extra_args.append('--debugger=\'%s\'' % debugger)

Ugh, gross. We really need to make this call into reftest as a Python module.
Attachment #8492309 - Flags: review?(ted) → review+
https://hg.mozilla.org/mozilla-central/rev/e8559c32028f
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Blocks: 1069891
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.