llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.39k stars 11.73k forks source link

Verifier: check for unsized TLS objects #4911

Open edwintorok opened 15 years ago

edwintorok commented 15 years ago
Bugzilla Link 4539
Version unspecified
OS Linux
CC @asl,@lattner,@efriedma-quic,@nlewycky,@nigelp-xmos

Extended Description

On 2009-07-08 23:00, Chris Lattner wrote:

+++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp Wed Jul 8
14:04:27 2009 @@ -270,9 +270,8 @@ } const Type *Ty = cast(GV->getType())->getElementType(); if (!Ty->isSized() || isZeroLengthArray(Ty)) {

  • cerr << "Size of thread local object " << GVar->getName()
  • << " is unknown\n";
  • abort();
  • llvm_report_error("Size of thread local object " + GVar-

    getName()

    • " is unknown");

This should be an assertion, does the verifier catch this? If not, it
should.

I don't see any code in the verifier to check Thread Local variables.

lattner commented 14 years ago

any volunteers to implement this?

efriedma-quic commented 15 years ago

I'm not sure what this is about... unless I'm mistaken, it shouldn't be possible to define an unsized variable, regardless of whether it's thread-local. Not sure about a zero-length array, though.