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

bap-mc should report error when disassembler creation failed to both console and to OS #47

Closed
maverickwoo opened this issue Dec 21, 2014 · 0 comments · Fixed by #71
Closed
Assignees

Comments

@maverickwoo
Copy link
Member

Consider

$ echo "0x31 0xd2 0x48 0xf7 0xf3" | bap-mc --show-inst --show-asm --arch x86

With 8c8b68e, the program terminates silently and returns 0 to the OS. It is not obvious to the user what went wrong. We should report the error to the console and also to the OS.

P.S. The failure lies in disassembler creation---x86 is not a valid cpu name in llvm.

@rvantonder rvantonder self-assigned this Dec 22, 2014
ivg added a commit to ivg/bap that referenced this issue Jan 16, 2015
1. bap-mc now accepts more user inputs:
   1. bytes can be separated with spaces, commas and semicolons
   2. bytes can be left without separators

2. bap-mc will now error in case of error
   This is to resolve BinaryAnalysisPlatform#47 and others

3. bap-mc will now properly handle invalid instructions
   Previously there was a bug, as a result error handler was applied
   prematurely. Also, I've extended error handler with pretty-printer
   that will output dump, highlighting failed piece of code.

4. readbin will linear sweep executable sections

5. bap-server if ordered to disassemble the whole image will
   disassemble only executable part of the file. I think this is a more
   reasonable behavior, rather than previously to disassemble the whole
   file including data sections.
ivg added a commit to ivg/bap that referenced this issue Jan 16, 2015
The PR will bring us the following:

1. BAP now support 25 different architectures.
   Also Arch module can now infer address size and endianness from the
   specified architecture.

2. Bap server doesn't require address size or endian.
   Only arch is required, everything else can be inferred from it.

3. Addresses in Public API is no longer an ADT but a string encoded
   number, with value specified strictly in hexes.

4. BIL and ADT classes are extended.
   Added some helpers, and also add named properties to BIL entities.

5. Updated README.md and simplified installation.
   This will resolve BinaryAnalysisPlatform#62

6. Packaged server a little more accurately, although it still
   not pluginized (see BinaryAnalysisPlatform#67)

7. Hardened `bap.py` for multithreaded environment
   bap will try to autospawn one server per process, and multiple
   bap proxies will be created per thread

8. bap-mc now accepts more user inputs:
   1. bytes can be separated with spaces, commas and semicolons
   2. bytes can be left without separators

9. bap-mc will now error in case of error
   This is to resolve BinaryAnalysisPlatform#47 and others

10. bap-mc will now properly handle invalid instructions
   Previously there was a bug, as a result error handler was applied
   prematurely. Also, I've extended error handler with pretty-printer
   that will output dump, highlighting failed piece of code.

11. readbin will linear sweep executable sections

12. bap-server if ordered to disassemble the whole image will
   disassemble only executable part of the file. I think this is a more
   reasonable behavior, rather than previously to disassemble the whole
   file including data sections.
ivg added a commit to ivg/bap that referenced this issue Jan 16, 2015
The PR will bring us the following:

1. BAP now support 25 different architectures.
   Also Arch module can now infer address size and endianness from the
   specified architecture.

2. Bap server doesn't require address size or endian.
   Only arch is required, everything else can be inferred from it.

3. Addresses in Public API is no longer an ADT but a string encoded
   number, with value specified strictly in hexes.

4. BIL and ADT classes are extended.
   Added some helpers, and also add named properties to BIL entities.

5. Updated README.md and simplified installation.
   This will resolve BinaryAnalysisPlatform#62

6. Packaged server a little more accurately, although it still
   not pluginized (see BinaryAnalysisPlatform#67)

7. Hardened `bap.py` for multithreaded environment
   bap will try to autospawn one server per process, and multiple
   bap proxies will be created per thread

8. bap-mc now accepts more user inputs:
   1. bytes can be separated with spaces, commas and semicolons
   2. bytes can be left without separators

9. bap-mc will now error in case of error
   This is to resolve BinaryAnalysisPlatform#47 and others

10. bap-mc will now properly handle invalid instructions
   Previously there was a bug, as a result error handler was applied
   prematurely. Also, I've extended error handler with pretty-printer
   that will output dump, highlighting failed piece of code.

11. readbin will linear sweep executable sections

12. bap-server if ordered to disassemble the whole image will
   disassemble only executable part of the file. I think this is a more
   reasonable behavior, rather than previously to disassemble the whole
   file including data sections.
ivg added a commit to ivg/bap that referenced this issue Jan 16, 2015
The PR will bring us the following:

1. BAP now supports 25 different architectures.
   Also Arch module can now infer address size and endianness from the
   specified architecture.

2. Bap server doesn't require address size or endian.
   Only arch is required, everything else can be inferred from it.

3. Addresses in Public API is no longer an ADT but a string encoded
   number, with value specified strictly in hexes.

4. BIL and ADT classes are extended.
   Added some helpers, and also add named properties to BIL entities.

5. Updated README.md and simplified installation.
   This will resolve BinaryAnalysisPlatform#62

6. Packaged server a little more accurately, although it still
   not pluginized (see BinaryAnalysisPlatform#67)

7. Hardened `bap.py` for multithreaded environment
   bap will try to autospawn one server per process, and multiple
   bap proxies will be created per thread

8. bap-mc now accepts more user inputs:
   1. bytes can be separated with spaces, commas and semicolons
   2. bytes can be left without separators

9. bap-mc will now error in case of error
   This is to resolve BinaryAnalysisPlatform#47 and others

10. bap-mc will now properly handle invalid instructions
   Previously there was a bug, as a result error handler was applied
   prematurely. Also, I've extended error handler with pretty-printer
   that will output dump, highlighting failed piece of code.

11. readbin will linear sweep executable sections if there are no
    symbol information.

12. bap-server if ordered to disassemble the whole image will
   disassemble only executable part of the file. I think this is a more
   reasonable behavior, rather than previously to disassemble the whole
   file including data sections.
@ivg ivg closed this as completed in #71 Jan 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants