llvm-project/llvm/lib/MC
George Rimar 099960d322 [MC] - Don't assert when non-english characters are used.
I found that llvm-mc does not like non-english characters even in comments,
which it tries to tokenize.

Problem happens because of functions like isdigit(), isalnum() which takes
int argument and expects it is not negative.
But at the same time MCParser uses char* to store input buffer poiner, char has signed value,
so it is possible to pass negative value to one of functions from above and
that triggers an assert. 
Testcase for demonstration is provided.

To fix the issue helper functions were introduced in StringExtras.h

Differential revision: https://reviews.llvm.org/D38461

llvm-svn: 314883
2017-10-04 08:50:08 +00:00
..
MCDisassembler Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MCParser [MC] - Don't assert when non-english characters are used. 2017-10-04 08:50:08 +00:00
CMakeLists.txt Rename WinCOFFStreamer.cpp -> MCWinCOFFStreamer.cpp 2017-06-21 20:58:17 +00:00
ConstantPools.cpp Re-apply r302416: [ARM] Clear the constant pool cache on explicit .ltorg directives 2017-05-22 09:42:07 +00:00
ELFObjectWriter.cpp [mips] Implement generation of relocations "chains" used by N32 ABI 2017-09-21 14:04:53 +00:00
LLVMBuild.txt
MCAsmBackend.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MCAsmInfo.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MCAsmInfoCOFF.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCAsmInfoDarwin.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MCAsmInfoELF.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MCAsmInfoWasm.cpp [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
MCAsmStreamer.cpp Re-land "Fix Bug 30978 by emitting cv file checksums." 2017-09-19 18:14:45 +00:00
MCAssembler.cpp Simplify interface now that we don't need to pass IsPCRel. NFC. 2017-07-11 23:56:10 +00:00
MCCodeEmitter.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-08 22:23:19 +00:00
MCCodeView.cpp Re-land "Fix Bug 30978 by emitting cv file checksums." 2017-09-19 18:14:45 +00:00
MCContext.cpp [WebAssembly] Remove flags from MCSectionWasm 2017-09-12 18:31:24 +00:00
MCDwarf.cpp MC: simplify internal function call parameter 2017-07-29 20:03:02 +00:00
MCELFObjectTargetWriter.cpp [mips] Do not pass redundant IsN64 flag to MCELFObjectTargetWriter. NFC 2017-09-21 14:04:47 +00:00
MCELFStreamer.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MCExpr.cpp [MachO] Fix codegen of alias of alias. 2017-06-08 20:49:03 +00:00
MCFragment.cpp [llvm] Fix some typos. NFC. 2017-09-15 20:01:43 +00:00
MCInst.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCInstPrinter.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MCInstrAnalysis.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MCInstrDesc.cpp
MCLabel.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-08 22:23:19 +00:00
MCLinkerOptimizationHint.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCMachOStreamer.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MCMachObjectTargetWriter.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCNullStreamer.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MCObjectFileInfo.cpp [WebAssembly] MC: Create wasm data segments based on MCSections 2017-09-15 20:54:59 +00:00
MCObjectStreamer.cpp Re-land "Fix Bug 30978 by emitting cv file checksums." 2017-09-19 18:14:45 +00:00
MCObjectWriter.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MCRegisterInfo.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MCSchedule.cpp
MCSection.cpp Mark dump() methods as const. NFC 2017-06-21 22:19:17 +00:00
MCSectionCOFF.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MCSectionELF.cpp [Triple] Add isThumb and isARM functions. 2017-08-12 17:40:18 +00:00
MCSectionMachO.cpp Fix the GCC build. 2017-01-30 19:05:09 +00:00
MCSectionWasm.cpp [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
MCStreamer.cpp Re-land "Fix Bug 30978 by emitting cv file checksums." 2017-09-19 18:14:45 +00:00
MCSubtargetInfo.cpp Typo: const MCSchedModel SchedModel -> const MCSchedModel &SchedModel 2017-09-27 12:48:48 +00:00
MCSymbol.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MCSymbolELF.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MCTargetOptions.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MCValue.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
MCWasmObjectTargetWriter.cpp [WebAssembly] Remove unused methods from MCWasmObjectTargetWriter 2017-06-06 16:38:59 +00:00
MCWasmStreamer.cpp [WebAssembly] MC: Create wasm data segments based on MCSections 2017-09-15 20:54:59 +00:00
MCWin64EH.cpp
MCWinCOFFStreamer.cpp [MC] Allow assembling .secidx and .secrel32 for undefined symbols 2017-06-22 21:02:14 +00:00
MCWinEH.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MachObjectWriter.cpp Simplify interface now that we don't need to pass IsPCRel. NFC. 2017-07-11 23:56:10 +00:00
StringTableBuilder.cpp Simplify multikey_qsort function. 2017-10-03 23:12:01 +00:00
SubtargetFeature.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
WasmObjectWriter.cpp [WebAssembly] Allow each data segment to specify its own alignment 2017-09-29 16:50:08 +00:00
WinCOFFObjectWriter.cpp Simplify interface now that we don't need to pass IsPCRel. NFC. 2017-07-11 23:56:10 +00:00