[Issue 6050] New: Cannot build DMD when group_id is > 999999
http://d.puremagic.com/issues/show_bug.cgi?id=6050 Summary: Cannot build DMD when group_id is > 99 Product: D Version: D1 & D2 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2011-05-23 23:34:33 PDT --- In src/libelf.c, OmToHeader, it assumes the group_id is at most 6-digit long, which is not necessarily true. See http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=136797 for detail. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6049] [CTFE]: Array literals of structs with invariant() are wrong
http://d.puremagic.com/issues/show_bug.cgi?id=6049 Jonathan M Davis changed: What|Removed |Added CC||jmdavisp...@gmx.com --- Comment #1 from Jonathan M Davis 2011-05-23 21:35:53 PDT --- So, as a temporary fix to make the autotester is passing, commenting out the invariants should fix the problem? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6049] New: [CTFE]: Array literals of structs with invariant() are wrong
http://d.puremagic.com/issues/show_bug.cgi?id=6049 Summary: [CTFE]: Array literals of structs with invariant() are wrong Product: D Version: D1 & D2 Platform: Other OS/Version: Windows Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: clugd...@yahoo.com.au --- Comment #0 from Don 2011-05-23 21:27:29 PDT --- Applies only to the latest DMD in git. Reduced from unittest failure in std.datetime. --- struct Bug6049 { int m; this(int x) { m = x; } invariant() { } } const Bug6049[] foo6049 = [Bug6049(6), Bug6049(17)]; static assert(foo6049[0].m == 6); --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1001] print stack trace (in debug mode) when program die
http://d.puremagic.com/issues/show_bug.cgi?id=1001 --- Comment #43 from Matt Peterson 2011-05-23 21:05:38 PDT --- I just tested building with -m32 and that works, although the symbols are still mangled. With -m64 I don't get any lines in the stack trace at all. In fact, I only see one line of -. I'm not not getting the one there should be at the end. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1001] print stack trace (in debug mode) when program die
http://d.puremagic.com/issues/show_bug.cgi?id=1001 --- Comment #42 from Jonathan M Davis 2011-05-23 17:44:47 PDT --- I haven't been seeing the stack traces with 64-bit either. I don't even get the addresses (which is what you get if you don't have -L--export-dynamic). I'm seeing the same behavior as Matt. It works fine on my 32-bit machine, but on my 64-bit machine where I'm using pure 64-bit D (dmd, druntime, and Phobos are all 64-bit), the stack traces are always empty. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4705] Redesign of std.algorithm.max()/min() + mins()/maxs()
http://d.puremagic.com/issues/show_bug.cgi?id=4705 --- Comment #11 from bearophile_h...@eml.cc 2011-05-23 16:16:25 PDT --- (In reply to comment #10) > (Maybe I'd like an annotation to tell the compiler that "data" is an an Input > Range, unlike iota() that map is iterating on.) This bug doesn't happen if the mapping function of map() is pure. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4705] Redesign of std.algorithm.max()/min() + mins()/maxs()
http://d.puremagic.com/issues/show_bug.cgi?id=4705 --- Comment #10 from bearophile_h...@eml.cc 2011-05-23 16:12:53 PDT --- The code that uses minPos() also leads to a possible bug (a real bug I have found in my code), shown here: import std.stdio, std.algorithm, std.math, std.range, std.random; int gen(int x) { return uniform(-100, 100); } void main() { auto data = map!gen(iota(10)); writeln(data); writeln(data); int result = minPos!((a, b){ return abs(a) < abs(b); })(data).front(); writeln(result); } The output shows that gen is recomputed every time data is used, so abs(a)http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6048] struct methods included in .tupleof
http://d.puremagic.com/issues/show_bug.cgi?id=6048 Robert Clipsham changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #2 from Robert Clipsham 2011-05-23 23:58:22 BST --- Thank you. I'd forgotten that local structs aren't POD. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1001] print stack trace (in debug mode) when program die
http://d.puremagic.com/issues/show_bug.cgi?id=1001 --- Comment #41 from Matt Peterson 2011-05-23 15:41:50 PDT --- (In reply to comment #40) > The code for this is in core/runtime. If you're using a custom dmd.conf, the > problem may be that you're missing an -L--export-dynamic. I'm not using a custom dmd.conf and that switch is there. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1001] print stack trace (in debug mode) when program die
http://d.puremagic.com/issues/show_bug.cgi?id=1001 --- Comment #40 from Sean Kelly 2011-05-23 15:27:35 PDT --- The code for this is in core/runtime. If you're using a custom dmd.conf, the problem may be that you're missing an -L--export-dynamic. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6048] struct methods included in .tupleof
http://d.puremagic.com/issues/show_bug.cgi?id=6048 kenn...@gmail.com changed: What|Removed |Added CC||kenn...@gmail.com --- Comment #1 from kenn...@gmail.com 2011-05-23 15:25:24 PDT --- This is expected. An inner struct contains a context pointer to the scope. Use 'static struct' and that 'void*' member will be gone. To illustrate: --- void main() { struct S{ void a(){} } static struct T{ void b(){} } pragma(msg, S.tupleof); pragma(msg, T.tupleof); } --- tuple((S).this) tuple() --- (Although changing that struct to 'static struct' causes a forward-reference error) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6048] New: struct methods included in .tupleof
http://d.puremagic.com/issues/show_bug.cgi?id=6048 Summary: struct methods included in .tupleof Product: D Version: D2 Platform: Other OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: rob...@octarineparrot.com --- Comment #0 from Robert Clipsham 2011-05-23 22:17:13 BST --- The following code: template canPersist(T) { enum canPersist = canPersist!(T, typeof(T.tupleof)); } template canPersist(T, U...) { enum canPersist = canPersist!(T, U[0]) && canPersist!(T, U[1..$]); } template canPersist(T, U : U*) { static assert(0, "is this a bug in dmd? methods shouldn't be in .tupleof"); } void main() { struct Test { bool opEquals(ref const Test other) const { return true; } } enum foo = canPersist!Test; } Fails to compile with: prog.d(13): Error: static assert "is this a bug in dmd? methods shouldn't be in .tupleof" prog.d(3):instantiated from here: canPersist!(Test,void*) prog.d(25):instantiated from here: canPersist!(Test) Adding additional methods to Test has no effect (they don't show up in .tupleof), same goes for normal fields (providing you add template canPersist(T, U) { enum canPersist = true; }). Iterating over typeof(Test.tupleof) in main() does not give the void* type. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6047] Segfault when struct with three or more ulongs with a toString is passed to format with at least two substitution clauses.
http://d.puremagic.com/issues/show_bug.cgi?id=6047 --- Comment #3 from Bernard Helyer 2011-05-23 06:31:32 PDT --- I was mistaken -- it's only when building a 64 bit binary. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6047] Segfault when struct with three or more ulongs with a toString is passed to format with at least two substitution clauses.
http://d.puremagic.com/issues/show_bug.cgi?id=6047 --- Comment #2 from kenn...@gmail.com 2011-05-23 05:57:50 PDT --- (No-repro on Mac OS X.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4705] Redesign of std.algorithm.max()/min() + mins()/maxs()
http://d.puremagic.com/issues/show_bug.cgi?id=4705 --- Comment #9 from bearophile_h...@eml.cc 2011-05-23 05:12:44 PDT --- Another example, compared to using minPos(): import std.stdio, std.algorithm, std.array; void main() { string[] data = ["red", "hello", "yes", "no", "roger", "bud"]; // works in DMD 2.053 string r1 = minPos!q{ walkLength(a) > walkLength(b) }(data).front(); writeln(r1); // proposed string r2 = max!q{ walkLength(a) }(items); writeln(r2); } The second version is shorter and more readable, and just like schwartzSort() the modified max() is more efficient than using minPos when the mapping function becomes costly to compute. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6047] Segfault when struct with three or more ulongs with a toString is passed to format with at least two substitution clauses.
http://d.puremagic.com/issues/show_bug.cgi?id=6047 --- Comment #1 from Bernard Helyer 2011-05-23 05:05:16 PDT --- I didn't mention my specs. Linux (64 or 32 bit build and output), 2.053 (but it's been there for months, _at least_, to my knowledge), Phenom II X4, Arch Linux. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6047] New: Segfault when struct with three or more ulongs with a toString is passed to format with at least two substitution clauses.
http://d.puremagic.com/issues/show_bug.cgi?id=6047 Summary: Segfault when struct with three or more ulongs with a toString is passed to format with at least two substitution clauses. Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: blood.of.l...@gmail.com --- Comment #0 from Bernard Helyer 2011-05-23 05:01:35 PDT --- import std.string; struct A { ulong a, b, c; string toString() { return ""; } } void main() { A a; format("%s%s", a, ""); } There has to be at least 24 bytes (or so) of declarations, so at least three ulongs. The toString has to be there. That second parameter to format has to be there. Somewhere, there is stack corruption happening. This is preventing SDC's 64 bit build from working correctly (it crashes when it errors, as the Location struct is passed to format, manifesting this when its size_t decls are 64 bits wide). This could be from DMD or Phobos. I'm not sure. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6046] Not true for Java about Function Hijacking.
http://d.puremagic.com/issues/show_bug.cgi?id=6046 Steven Schveighoffer changed: What|Removed |Added CC||schvei...@yahoo.com --- Comment #1 from Steven Schveighoffer 2011-05-23 04:40:59 PDT --- I would say the only valid request here is to mention that Java has the @override flag which can be used to prevent hijacking, but is not the default. I think you misunderstood the point of this article. The point is to prevent hijacking the *default* must be to prevent hijacking. Having annotations and modifiers that allow you to prevent hijacking is not good enough. I think you also misunderstood the scope in the article of Java's shortcomings. I think the author only singles out one aspect of Java, it's overload resolution for inherited methods. Nothing else applies to Java. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2962] ICE(glue.c) or bad codegen passing variable as template value parameter
http://d.puremagic.com/issues/show_bug.cgi?id=2962 --- Comment #34 from Don 2011-05-23 04:20:16 PDT --- (In reply to comment #33) > dmd v2.052, Ubuntu, quite short example of this bug: No, that's a long example -- it imports from Phobos. Test cases for compiler bugs which import from Phobos are not completely reduced. The examples in comments 20 and 29 are minimal test cases. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6046] New: Not true for Java about Function Hijacking.
http://d.puremagic.com/issues/show_bug.cgi?id=6046 Summary: Not true for Java about Function Hijacking. Product: D Version: unspecified Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: websites AssignedTo: nob...@puremagic.com ReportedBy: on...@yahoo.com --- Comment #0 from Matthew Ong 2011-05-23 02:45:48 PDT --- Hi Digitalmars/Walter Bright, http://www.digitalmars.com/d/2.0/hijack.html This talk covers function hijacking, where adding innocent and reasonable declarations in a module can wreak arbitrary havoc on an application program in C++(maybe true) and Java(not true). Since I have not done C++ for a long while, I am not going to comment about that. But Java I have to place this request for correction from DigitalMars. javac(from sun) Compiler will complain if there is an ambiguous to link any indentifier that has the same signature for contructor, methods(static/overloaded/overriden) Overload Sets Java denys global functions. All functions/methods are within a single class. Within the same class, the overloaded methods cannot have the same signature. public class MyClass{ public int myVal(){ } public String myVal(){ // compiler will complain here as error and NOT warning. } } Both the method identifier and zero param list makes a identical signature. Derived Class Member Function Hijacking IDE like Netbeans and does flag: @override public void myMethodA(){ // Say you did not use the override tag } Base Class Member Function Hijacking to prevent the child class from stealing your implementation for this single method, do: public final void myMethodA(){ // final == sealed in C# } That is shown clearly when you tries to import both this 2 classes within Java: import java.util.Date; import java.sql.Date; public class MyTest{ public static void main(String[] args){ Date now=new Date(); // thinking that you are using java.util.Date; } } Again, as a senior Java Developer since java jdk 1.1 I agrees D as a good replacement for C++ because of modern design and approaches. Kindly correct that to avoid confusing the new Java to D developer. There are also other run time intelligent build into JVM to avoid malicious hacker attack on such thing using class proxy & stub. -- Matthew Ong email: on...@yahoo.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2962] ICE(glue.c) or bad codegen passing variable as template value parameter
http://d.puremagic.com/issues/show_bug.cgi?id=2962 Andriy changed: What|Removed |Added CC||andr...@gmail.com --- Comment #33 from Andriy 2011-05-23 02:35:44 PDT --- dmd v2.052, Ubuntu, quite short example of this bug: $ cat main.d import std.stdio; void main(){} $ cat utils.d import std.json; auto val = &parseJSON!string; $ dmd main.d utils.d /usr/include/d/dmd/phobos/std/conv.d(1301): Error: function std.conv.parse!(real,string).parse compiler error, parameter 'p', bugzilla 2962? dmd: glue.c:734: virtual void FuncDeclaration::toObjFile(int): Assertion `0' failed. Aborted (core dumped) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---