1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/unittests/BinaryFormat
Chris Bieneman f88e9ada1e Re-land: [MachO] Fixing ub in MachO BinaryFormat
This re-lands r333797 with a fix for big endian systems.

Original commit message:

This isn't encountered anywhere inside LLVM, so I wrote a test case to expose the issue and verify that it is fixed.

The basic problem is that the macho_load_command union contains all load comamnd structs. Load command structs in 32-bit macho files can be 32-bit aligned instead of 64-bit aligned.

There are some strange circumstances in which this can be exposed in a 64-bit macho if the load commands are invalid or if a 32-bit aligned load command is used. In the past we've worked around this type of problem with changes like r264232.

llvm-svn: 333854
2018-06-03 20:33:42 +00:00
..
CMakeLists.txt Re-land: [MachO] Fixing ub in MachO BinaryFormat 2018-06-03 20:33:42 +00:00
DwarfTest.cpp [dwarf] Unify unknown dwarf enum formatting code 2018-03-21 11:46:37 +00:00
MachOTest.cpp Re-land: [MachO] Fixing ub in MachO BinaryFormat 2018-06-03 20:33:42 +00:00
TestFileMagic.cpp Teach identify_file_magic to identify PDB files. 2018-03-07 18:40:41 +00:00