[PATCH] D11221: Fix crash when using __attribute__((section (".bss.name"))) incorrectly

Jakub Kuderski jakub.kuderski at arm.com
Wed Jul 15 08:12:50 PDT 2015


kuhar created this revision.
kuhar added a subscriber: cfe-commits.
kuhar set the repository for this revision to rL LLVM.

Previously, using __attribute__((section("bss.name")) incorrectly caused clang to crash displaying error from backed. This patch makes clang's frontend produce clear diagnostic/error.

Two main cases that are handled is using the attribute with functions and with variables initialized to non-zero values.
`__attribute__((section(".bss.name"))) void func() { }`
`__attribute__((section(".bss.name"))) int a = 3;`


Repository:
  rL LLVM

http://reviews.llvm.org/D11221

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaDeclAttr.cpp
  test/Sema/attr-section-bss.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11221.29781.patch
Type: text/x-patch
Size: 6655 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150715/05008c1f/attachment.bin>


More information about the cfe-commits mailing list