[PATCH] [IR/AsmWriter] Output escape sequences if the first character isdigit()

Filipe Cabecinhas filcab+llvm.phabricator at gmail.com
Wed May 27 18:00:11 PDT 2015


Hi dexonsmith, rafael,

If the first character in a metadata attachment's name is a digit, it has
to be output using an escape sequence, otherwise it's not valid text IR.

Removed an over-zealous assert from LLVMContext which didn't allow this.
The rule should only apply to text IR. Actual names can have any sequence
of non-NUL bytes.

Also added some documentation on accepted names.

Bug found with AFL fuzz.

http://reviews.llvm.org/D10079

Files:
  docs/LangRef.rst
  lib/IR/AsmWriter.cpp
  lib/IR/LLVMContext.cpp
  test/Feature/metadata.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10079.26655.patch
Type: text/x-patch
Size: 3798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150528/c47512cd/attachment.bin>


More information about the llvm-commits mailing list