First Last Prev Next    No search results available
Details
: [llvm-g++] Crash using placement new on an array type
Bug#: 529
: tools
: llvm-g++
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.0
: P2
: blocker
: 1.5

:
: compile-fail
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Justin Wick <JustinWick@aol.com>
Assigned To: Chris Lattner <sabre@nondot.org>

Attachments


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2005-02-27 03:04
At the URL you will find a simple test case.  I had others run this case on
their mac, and it was 
confirmed to die in the front end.  Changing backends did not alter the error
message at all.  Error 
message (as noted in file) was:

testcase.cpp: In member function `T& Array<T>::append() [with T =
double[4][4]]':
testcase.cpp:147: internal compiler error: Bus error
------- Comment #1 From Chris Lattner 2005-02-27 13:25:01 -------
Here's a reduced testcase:

---
typedef unsigned int size_t;
extern "C++" {
  inline void* operator new(size_t, void* __p) throw() { return __p; }
  inline void* operator new[](size_t, void* __p) throw() { return __p; }
}
typedef double Ty[4];

void foo(Ty *XX) {
  new(XX) Ty();
}
---

I don't have time right this second to look into this any more, but hopefully
I'll get it fixed by tonight.

-Chris
------- Comment #2 From Chris Lattner 2005-02-27 13:30:15 -------
Okay, this was actually a trivial bug to fix.  Here's the testcase:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050221/024325.html

and here's the patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050221/024326.html

Thanks for the report!

-Chris

First Last Prev Next    No search results available