Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2to3 dies on Clang 3.5's asan_symbolize.py #372

Closed
ramosian-glider opened this issue Sep 1, 2015 · 4 comments
Closed

2to3 dies on Clang 3.5's asan_symbolize.py #372

ramosian-glider opened this issue Sep 1, 2015 · 4 comments

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 372

Sorry to report this guys. What can I say about Python and breaking basic input/output....

$ sudo 2to3 -w /usr/local/bin/asan_symbolize.py 
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Can't parse /usr/local/bin/asan_symbolize.py: ParseError: bad input:
type=22, value=u'=', context=('', (91, 34))
RefactoringTool: No files need to be modified.
RefactoringTool: There was 1 error:
RefactoringTool: Can't parse /usr/local/bin/asan_symbolize.py: ParseError: bad input:
type=22, value=u'=', context=('', (91, 34))

Reported by noloader on 2015-01-15 02:11:52

@ramosian-glider
Copy link
Member Author

Line 91 is the print statement below:

    try:
      symbolizer_input = '%s %s' % (binary, offset)
      if DEBUG:
        print(symbolizer_input)
      print(symbolizer_input, file=self.pipe.stdin)
      while True:
        ...


Reported by noloader on 2015-01-15 02:13:47

@ramosian-glider
Copy link
Member Author

So it appears to make this work on some of the Pythons (god knows what they'll break
next):

    print(symbolizer_input, file=self.pipe.stdin)

should be changed to:

    file=self.pipe.stdin
    print(symbolizer_input, file)

The changes need to occur on line 91 and 142.

Reported by noloader on 2015-01-15 02:41:19

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:06:35

  • Labels added: ProjectAddressSanitizer

@ramosian-glider
Copy link
Member Author

Not sure if this is reproducible or not.
Patches welcome, anyway (see https://github.com/google/sanitizers/wiki/AddressSanitizerHowToContribute)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant