digitalmars.D.learn - GG bug? (OS X Lion, DMD 2.054)
- Magnus Lie Hetland (26/26) Aug 03 2011 I upgraded from OS X Snow Leopard to Lion recently (on a 32-bit iMac),
- Magnus Lie Hetland (8/8) Aug 03 2011 Note that an explicit call to GC.collect isn't necessary. Whenever
- David Nadlinger (9/13) Aug 03 2011 This seems to be exactly same problem I reported to the NG some days
- Magnus Lie Hetland (8/22) Aug 04 2011 Yeah, I saw this after I posted here:
- Magnus Lie Hetland (8/15) Aug 04 2011 Sorry for being a n00b here, but ... what's the intended way of using
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (5/17) Aug 04 2011 Hi,
- Magnus Lie Hetland (5/10) Aug 04 2011 Thanks!
- Magnus Lie Hetland (15/20) Aug 04 2011 others trying to do the same (i.e., compile this stuff in OS X Lion),
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (3/21) Aug 04 2011 You can probably just pass SDK=... to the make process too.
- Jacob Carlborg (6/18) Aug 04 2011 Since it's just the runtime that's been changed in this case, perhaps
- Magnus Lie Hetland (8/11) Aug 04 2011 I guess so. I've just starting compiling/linking stuff together -- I'll
I upgraded from OS X Snow Leopard to Lion recently (on a 32-bit iMac), and when I tried to run my D code afterward, I suddenly ran into all kinds of interesting problems (lots of failed assertions in my tests, and bus errors in my actual runs...). Still cleaning stuff up, but I've isolated at least one thing that seems to be a bug, and that wasn't there before I upgraded. Now, I upgraded from DMD 2.052 to 2.054 before doing any extensive debugging, so I'm not 100% sure this specific problem was there in 2.052 as well, but I *think* so (i.e., making the switch to Lion the triggering factor). Anyway, here's some code: import std.exception, core.memory; class Foo { bool bar; } void main() { auto f = new Foo; f.bar = true; //GC.collect(); enforce(f.bar); } Works well, unless you uncomment the GC call, in which case a bus error occurs (at least for me). Seems the collector is a bit over-eager...? -- Magnus Lie Hetland http://hetland.org
Aug 03 2011
Note that an explicit call to GC.collect isn't necessary. Whenever collection occurs, the collectors seems rather indiscriminate, collecting things it shouldn't, resulting in bus errors. When I disable the GC, my code runs just fine. (My production code, that is. There are still mysterious, probably Lion-related, bugs in my test suite...) -- Magnus Lie Hetland http://hetland.org
Aug 03 2011
On 8/3/11 4:07 PM, Magnus Lie Hetland wrote:I upgraded from OS X Snow Leopard to Lion recently (on a 32-bit iMac), and when I tried to run my D code afterward, I suddenly ran into all kinds of interesting problems (lots of failed assertions in my tests, and bus errors in my actual runs...).This seems to be exactly same problem I reported to the NG some days ago. It is caused by ASLR being enabled for 32bit applications on Lion too, and kennytm is to be credited for tracking this down to a fixed stack bottom in the druntime code: https://github.com/D-Programming-Language/druntime/pull/43. The fix has already been merged into master, please use that for OS X development until the next DMD release. David
Aug 03 2011
On 2011-08-03 14:57:57 +0000, David Nadlinger said:On 8/3/11 4:07 PM, Magnus Lie Hetland wrote:Yeah, I saw this after I posted here: "#d_lang Mac OS X Lion users - druntime patch http://t.co/9Ivehft"I upgraded from OS X Snow Leopard to Lion recently (on a 32-bit iMac), and when I tried to run my D code afterward, I suddenly ran into all kinds of interesting problems (lots of failed assertions in my tests, and bus errors in my actual runs...).This seems to be exactly same problem I reported to the NG some days ago. It is caused by ASLR being enabled for 32bit applications on Lion too, and kennytm is to be credited for tracking this down to a fixed stack bottom in the druntime code: https://github.com/D-Programming-Language/druntime/pull/43.The fix has already been merged into master, please use that for OS X development until the next DMD release.OK, great. Thanks.David-- Magnus Lie Hetland http://hetland.org
Aug 04 2011
On 2011-08-03 14:57:57 +0000, David Nadlinger said:This seems to be exactly same problem I reported to the NG some days ago. It is caused by ASLR being enabled for 32bit applications on Lion too, and kennytm is to be credited for tracking this down to a fixed stack bottom in the druntime code: https://github.com/D-Programming-Language/druntime/pull/43. The fix has already been merged into master, please use that for OS X development until the next DMD release.Sorry for being a n00b here, but ... what's the intended way of using the Git version? It seems to be split into five different repos...? Do I have to assemble a full distro myself, or am I just missing something obvious? (I'm assuming the latter, really ;) -- Magnus Lie Hetland http://hetland.org
Aug 04 2011
On 04-08-2011 14:09, Magnus Lie Hetland wrote:On 2011-08-03 14:57:57 +0000, David Nadlinger said:Hi, You can see my blog for Linux: http://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/ - AlexThis seems to be exactly same problem I reported to the NG some days ago. It is caused by ASLR being enabled for 32bit applications on Lion too, and kennytm is to be credited for tracking this down to a fixed stack bottom in the druntime code: https://github.com/D-Programming-Language/druntime/pull/43. The fix has already been merged into master, please use that for OS X development until the next DMD release.Sorry for being a n00b here, but ... what's the intended way of using the Git version? It seems to be split into five different repos...? Do I have to assemble a full distro myself, or am I just missing something obvious? (I'm assuming the latter, really ;)
Aug 04 2011
On 2011-08-04 12:27:54 +0000, Alex Rønne Petersen said:Hi, You can see my blog for Linux: http://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/Thanks! --Magnus Lie Hetland http://hetland.org
Aug 04 2011
On 2011-08-04 12:27:54 +0000, Alex Rønne Petersen said:Hi, You can see my blog for Linux: http://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/Forothers trying to do the same (i.e., compile this stuff in OS X Lion), one change is needed in posix.mak: Change ... SDK=/Developer/SDKs/MacOSX10.5.sdk #SDK=/Developer/SDKs/MacOSX10.6.sdk ... into ... SDK=/Developer/SDKs/MacOSX10.5.sdk #SDK=/Developer/SDKs/MacOSX10.6.sdk SDK=/Developer/SDKs/MacOSX10.7.sdk (or equivalent). -- Magnus Lie Hetland http://hetland.org
Aug 04 2011
On 04-08-2011 15:21, Magnus Lie Hetland wrote:On 2011-08-04 12:27:54 +0000, Alex Rønne Petersen said:You can probably just pass SDK=... to the make process too. - AlexHi, You can see my blog for Linux: http://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/Forothers trying to do the same (i.e., compile this stuff in OS X Lion), one change is needed in posix.mak: Change ... SDK=/Developer/SDKs/MacOSX10.5.sdk #SDK=/Developer/SDKs/MacOSX10.6.sdk ... into ... SDK=/Developer/SDKs/MacOSX10.5.sdk #SDK=/Developer/SDKs/MacOSX10.6.sdk SDK=/Developer/SDKs/MacOSX10.7.sdk (or equivalent).
Aug 04 2011
On 2011-08-04 14:09, Magnus Lie Hetland wrote:On 2011-08-03 14:57:57 +0000, David Nadlinger said:Since it's just the runtime that's been changed in this case, perhaps you just can compile the runtime and replace that with what's in the release. -- /Jacob CarlborgThis seems to be exactly same problem I reported to the NG some days ago. It is caused by ASLR being enabled for 32bit applications on Lion too, and kennytm is to be credited for tracking this down to a fixed stack bottom in the druntime code: https://github.com/D-Programming-Language/druntime/pull/43. The fix has already been merged into master, please use that for OS X development until the next DMD release.Sorry for being a n00b here, but ... what's the intended way of using the Git version? It seems to be split into five different repos...? Do I have to assemble a full distro myself, or am I just missing something obvious? (I'm assuming the latter, really ;)
Aug 04 2011
On 2011-08-04 13:01:19 +0000, Jacob Carlborg said:Since it's just the runtime that's been changed in this case, perhaps you just can compile the runtime and replace that with what's in the release.I guess so. I've just starting compiling/linking stuff together -- I'll see how it goes. (It can be useful to have the most recent version; ideally, it should have fewer bugs ;) If that fails, I could try just the runtime, as you suggest. -- Magnus Lie Hetland http://hetland.org
Aug 04 2011