www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - seg fault, now what?

reply Ryan <ryan.n.leach gmail.com> writes:
Is there an alternative to reporting bugs via bugzilla?

I tried to open an account, but they recommend not using your 
main e-mail address because it will be posted to the web for all 
the spammers to find. But I don't have another e-mail address, 
and it seems a bit much to create a fake e-mail account for a few 
bug reports.

I also tried to post to the threads about bugs, but they are all 
bugzilla archives.

I've narrowed it down to a pretty simple little program that 
demonstrates the bug, and even tried it on DMD/LDC2, for mac, 
ubuntu, and windows 10.

Thanks,
Sep 17 2016
next sibling parent reply Stefan Koch <uplink.coder googlemail.com> writes:
On Saturday, 17 September 2016 at 21:12:08 UTC, Ryan wrote:
 Is there an alternative to reporting bugs via bugzilla?

 I tried to open an account, but they recommend not using your 
 main e-mail address because it will be posted to the web for 
 all the spammers to find. But I don't have another e-mail 
 address, and it seems a bit much to create a fake e-mail 
 account for a few bug reports.

 I also tried to post to the threads about bugs, but they are 
 all bugzilla archives.

 I've narrowed it down to a pretty simple little program that 
 demonstrates the bug, and even tried it on DMD/LDC2, for mac, 
 ubuntu, and windows 10.

 Thanks,
Post the program somewhere otherwise we cannot help.
Sep 17 2016
parent reply Ryan <ryan.n.leach gmail.com> writes:
On Saturday, 17 September 2016 at 21:44:22 UTC, Stefan Koch wrote:
 On Saturday, 17 September 2016 at 21:12:08 UTC, Ryan wrote:
 Is there an alternative to reporting bugs via bugzilla?

 I tried to open an account, but they recommend not using your 
 main e-mail address because it will be posted to the web for 
 all the spammers to find. But I don't have another e-mail 
 address, and it seems a bit much to create a fake e-mail 
 account for a few bug reports.

 I also tried to post to the threads about bugs, but they are 
 all bugzilla archives.

 I've narrowed it down to a pretty simple little program that 
 demonstrates the bug, and even tried it on DMD/LDC2, for mac, 
 ubuntu, and windows 10.

 Thanks,
Post the program somewhere otherwise we cannot help.
import std.experimental.allocator; import std.experimental.allocator.gc_allocator; import std.experimental.allocator.mallocator; import std.experimental.allocator.building_blocks; import std.stdio; import std.range; struct S { // The allocator used for this instance private IAllocator myAlloc; // My payload private double[] _payload; // No empty payloads allowed disable this(); // Create an initialized payload this(size_t sz, double init, IAllocator alloc = theAllocator) { // Set the allocator first! myAlloc = alloc; _payload = myAlloc.makeArray!double(sz, init); assert(_payload, "Failed allocation..."); assert(_payload.length == sz, "Something is awry."); assert(_payload[0] == init, "Copy failed."); assert(_payload[$-1] == init, "Copy failed."); } // postblit - deep copy payload - I have an implementation for this, but it // is not needed to demo seg fault.... disable this(this); // Destructor to return memory ~this() { // No way _payload is null assert(_payload, "_payload is null"); // So give it back, I'm done with it for now myAlloc.dispose(_payload); } // Something to do with the object void ack() { writeln("ack"); stdout.flush(); } // Lots of other stuff..... // . // . // . } void main() { // Always works foreach(i; iota(1,5_000)) { writef("Doing default %d...", i); stdout.flush(); S s = S(i, i*i); s.ack(); } // Always works IAllocator alloc = allocatorObject(GCAllocator.instance); foreach(i; iota(1,5_000)) { writef("Doing GCAllocator %d...", i); stdout.flush(); S s = S(i, i*i, alloc); s.ack(); } // Always works alloc = allocatorObject(Mallocator.instance); foreach(i; iota(1,5_000)) { writef("Doing Mallocator %d...", i); stdout.flush(); S s = S(i, i*i, alloc); s.ack(); } // This one will seg fault on linux/mac/ldc2 win, not dmd windows. Why? auto ft = FreeTree!Mallocator(); alloc = allocatorObject(&ft); foreach(i; iota(1,5_000)) { writef("Doing FreeTree!Mallocator %d...", i); stdout.flush(); S s = S(i, i*i, alloc); s.ack(); } // This one will seg fault on linux/mac/ldc2 win, not dmd windows. Why? auto ft2 = FreeTree!GCAllocator(); alloc = allocatorObject(&ft2); foreach(i; iota(1,5_000)) { writef("Doing FreeTree!GCAllocator %d...", i); stdout.flush(); S s = S(i, i*i, alloc); s.ack(); } }
Sep 17 2016
parent reply ag0aep6g <anonymous example.com> writes:
On 09/17/2016 11:58 PM, Ryan wrote:
 On Saturday, 17 September 2016 at 21:44:22 UTC, Stefan Koch wrote:
[...]
 Post the program somewhere otherwise we cannot help.
[... code ...] Reduced and filed: https://issues.dlang.org/show_bug.cgi?id=16506
Sep 17 2016
parent Ryan <ryan.n.leach gmail.com> writes:
On Saturday, 17 September 2016 at 22:48:49 UTC, ag0aep6g wrote:
 On 09/17/2016 11:58 PM, Ryan wrote:
 On Saturday, 17 September 2016 at 21:44:22 UTC, Stefan Koch 
 wrote:
[...]
 Post the program somewhere otherwise we cannot help.
[... code ...] Reduced and filed: https://issues.dlang.org/show_bug.cgi?id=16506
Wow. Thank you.
Sep 17 2016
prev sibling next sibling parent Steven Schveighoffer <schveiguy yahoo.com> writes:
On 9/17/16 5:12 PM, Ryan wrote:
 Is there an alternative to reporting bugs via bugzilla?

 I tried to open an account, but they recommend not using your main
 e-mail address because it will be posted to the web for all the spammers
 to find. But I don't have another e-mail address, and it seems a bit
 much to create a fake e-mail account for a few bug reports.
Slightly OT, but with a gmail/yahoo address, generally the spam filter is quite good. I've used my yahoo address for years on bugzilla and this forum, and never had adverse spamming issues. -Steve
Sep 19 2016
prev sibling parent Kagamin <spam here.lot> writes:
On Saturday, 17 September 2016 at 21:12:08 UTC, Ryan wrote:
 But I don't have another e-mail address, and it seems a bit 
 much to create a fake e-mail account for a few bug reports.
mailmetrash.com :)
Sep 19 2016