valgrind flags memory leak in _d_monitor_create

2011-10-19 Thread Sean Silva
I'm on Ubuntu x64, with the vanilla DMD .deb installed.

I have attached the output of valgrind. The program that triggers
valgrind to report the leak it is practically any that I run, including
just a bare void main() { }. It looks like _d_monitor_create is
calloc'ing 72 bytes of memory that get definitely lost according to
valgrind.

begin 644 val.txt
M/3TQ-#4U-ST]($UE;6-H96-K+!A(UE;6]R2!EG)OB!D971E8W1O@H]
M/3$T-34W/3T@0V]P7)I9VAT(A#*2`R,#`R+3(P,3`L(%N9!'3E4@1U!,
M)V0L()Y($IU;EA;B!397=AF0@970@86PNCT],30U-3]/2!5VEN9R!6
M86QGFEN9TS+C8N,2!A;F0@3EB5D58.R!R97)U;B!W:71H(UH(9OB!C
M;W!YFEG:'0@:6YF;PH]/3$T-34W/3T@0V]M;6%N9#H@+B]B87)ECT],30U
M-3]/2`*/3TQ-#4U-ST](`H]/3$T-34W/3T@2$5!4!354U-05)9.@H]/3$T
M-34W/3T@(`@(EN('5S92!A=!EET.B`R-#@@8GET97,@:6X@-!B;]C
M:W,*/3TQ-#4U-ST](`@=]T86P@:5A!UV%G93H@,38@86QL;V-S+`Q
M,B!FF5ERP@-3`L-3,V()Y=5S(%L;]C871E9`H]/3$T-34W/3T@CT]
M,30U-3]/2`W,B!B71ER!I;B`Q()L;V-KR!AF4@95F:6YI=5L2!L
M;W-T(EN(QOW,@F5C;W)D(#0@;V8@-`H]/3$T-34W/3T@(`@870@,'@T
M0S(W.49#.B!C86QL;V,@*'9G7W)EQA8V5?;6%L;]C+F,Z-#8W*0H]/3$T
M-34W/3T@(`@8GD@,'@T,C4W,SZ(%]D7VUO;FET;W)?8W)E871E(AI;B`O
M:]M92]S96%N+V-O9EN9R]D+VQO=RUL979E;]B87)E*0H]/3$T-34W/3T@
M(`@8GD@,'@T,C`X-SDZ(%]D7VUO;FET;W)E;G1EB`H:6X@+VAO;64OV5A
M;B]C;V1I;FO9]L;WM;5V96PO8F%R92D*/3TQ-#4U-ST](`@()Y(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]/3$T
M-34W/3T@(`@(!P;W-S:6)L2!L;W-T.B`P()Y=5S(EN(#`@8FQO8VMS
MCT],30U-3]/2`@(!S=EL;!R96%C:%B;4Z(#$W-B!B71ER!I;B`S
M()L;V-KPH]/3$T-34W/3T@(`@(`@(!S=7!PF5SV5D.B`P()Y=5S
M(EN(#`@8FQO8VMSCT],30U-3]/2!296%C:%B;4@8FQO8VMS(AT:]S
M92!T;R!W:EC:!A('!O:6YT97(@=V%S(9O=6YD*2!AF4@;F]T('-H;W=N
M+@H]/3$T-34W/3T@5\@V5E('1H96TL(')EG5N('=I=@Z(TM;5A:RUC
M:5C:SUF=6QL(TMVAO=RUR96%C:%B;4]65SCT],30U-3]/2`*/3TQ
M-#4U-ST]($9OB!C;W5N=',@;V8@95T96-T960@86YD('-U'!R97-S960@
M97)R;W)S+!R97)U;B!W:71H.B`M=@H]/3$T-34W/3T@15)23U(@4U5-34%2
M63H@,2!EG)OG,@9G)O;2`Q(-O;G1E'1S(AS=7!PF5SV5D.B`T(9R
;VT@-D*
`
end


Re: valgrind flags memory leak in _d_monitor_create

2011-10-19 Thread Jonathan M Davis
On Wednesday, October 19, 2011 05:51:51 Sean Silva wrote:
 --nextPart77593048.e8O9o76Zdv
 
 I'm on Ubuntu x64, with the vanilla DMD .deb installed.
 
 I have attached the output of valgrind. The program that triggers
 valgrind to report the leak it is practically any that I run, including
 just a bare void main() { }. It looks like _d_monitor_create is
 calloc'ing 72 bytes of memory that get definitely lost according to
 valgrind.

This list is not intended to be posted to. You sign up for it you want to see 
all of the messages from bugzilla. Please report bugs in bugzilla: 
d.puremagic.com/issues

- Jonathan M Davis


[Issue 6830] New: valgrind flags memory leak in _d_monitor_create

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6830

   Summary: valgrind flags memory leak in _d_monitor_create
   Product: D
   Version: unspecified
  Platform: x86_64
OS/Version: Linux
Status: NEW
  Severity: minor
  Priority: P2
 Component: druntime
AssignedTo: nob...@puremagic.com
ReportedBy: chisophu...@gmail.com


--- Comment #0 from Sean Silva chisophu...@gmail.com 2011-10-18 23:58:42 PDT 
---
Created an attachment (id=1041)
valgrind output

I'm�on�Ubuntu�x64,�with�the�vanilla�DMD�.deb�installed.

I�have�attached�the�output�of�valgrind.�The�program�that�triggers
valgrind�to�report�the�leak�it�is�practically�any�that�I�run,�including
just�a�bare�void�main()�{�}.�It�looks�like�_d_monitor_create�is
calloc'ing�72�bytes�of�memory�that�get�definitely�lost�according�to
valgrind.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2553] Excess attribute propagation for interfaces

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2553


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
   Platform|x86 |All
 Resolution||FIXED
 OS/Version|Windows |All


--- Comment #2 from yebblies yebbl...@gmail.com 2011-10-19 21:00:33 EST ---
https://github.com/D-Programming-Language/dmd/commit/9621d716c9abb546f4ff86dd53ffb0956de36ff9

https://github.com/D-Programming-Language/dmd/commit/65e6dd16f0c70c49d5ff89fa23753b5977dd5502

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3836] [TDPL] obligatory override attribute

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3836



--- Comment #10 from yebblies yebbl...@gmail.com 2011-10-19 22:06:55 EST ---
Patch to make it deprecated:

https://github.com/D-Programming-Language/dmd/pull/462

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6665] Regression(2.055) ICE(cg87.c): static double inside closure

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6665


Maksim Zholudev maxim...@gmail.com changed:

   What|Removed |Added

 CC||maxim...@gmail.com


--- Comment #7 from Maksim Zholudev maxim...@gmail.com 2011-10-19 07:37:08 
PDT ---
More investigation.

- test.d -
struct Foo
{
double[2][2] dat;

double foo(size_t i, size_t j)
{
return dat[i][j] = 0;
}
}

void main()
{
Foo a;
}
--

Tested on Linux 64bit with dmd 2.055:
dmd -m32 test.d  - OK
dmd -m64 test.d  - Internal error: ../ztc/cg87.c 202
dmd -m32 -release test.d - OK
dmd -m64 -release test.d - OK

There is no error in any of the following cases:
  * dat is one-dimensional
  * one of the indexes in Foo.foo is constant (e.g. dat[i][0] = 0)
  * int or real used instead of double (float still produces the error)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6822] New ubuntu linking rules prevent dmd from linking programs on Ubuntu 11.10

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6822


Brad Roberts bra...@puremagic.com changed:

   What|Removed |Added

 CC||bra...@puremagic.com


--- Comment #1 from Brad Roberts bra...@puremagic.com 2011-10-19 09:16:00 PDT 
---
The right answer for this one probably is moving the -lrt part out of dmd.conf
and into core/time.d as pragma(lib, rt), conditional on linux.  I haven't
tried it though.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6822] New ubuntu linking rules prevent dmd from linking programs on Ubuntu 11.10

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6822



--- Comment #2 from Steven Schveighoffer schvei...@yahoo.com 2011-10-19 
09:31:13 PDT ---
That doesn't work.  pragma(lib) only works if you are compiling all files at
the same time.

This fails to compile:

void main() {}

I didn't import std.datetime at all, so the compiler would never know that it
had to link -lrt.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6822] New ubuntu linking rules prevent dmd from linking programs on Ubuntu 11.10

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6822



--- Comment #3 from Steven Schveighoffer schvei...@yahoo.com 2011-10-19 
09:31:54 PDT ---
(In reply to comment #2)
 I didn't import std.datetime at all

or rather core.time...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6822] New ubuntu linking rules prevent dmd from linking programs on Ubuntu 11.10

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6822


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #4 from Walter Bright bugzi...@digitalmars.com 2011-10-19 
11:37:15 PDT ---
https://github.com/D-Programming-Language/dmd/commit/1ff6ad8509cbfa73ae5519fa40898c5b005ab6ca

You'll still need to remove -lrt from your dmd.conf

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6822] New ubuntu linking rules prevent dmd from linking programs on Ubuntu 11.10

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6822



--- Comment #5 from Steven Schveighoffer schvei...@yahoo.com 2011-10-19 
11:47:11 PDT ---
works, thanks.  Note that it still works even if you leave -L-rt in dmd.conf,
even though it's not necessary to have it there.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6831] New: mangled name over 128 characters becomes unreadable

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6831

   Summary: mangled name over 128 characters becomes unreadable
   Product: D
   Version: D1  D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: kekeni...@yahoo.co.jp


--- Comment #0 from kekeni...@yahoo.co.jp 2011-10-19 11:52:26 PDT ---
I found that when a mangled name is very long, it turns into UNREADABLE
characters. And the limit of the length is 128 characters.( It is too short! )

- Beginning of source
module manglingtest;// length of module name is significant!

class MyClass { }

void tfunc(T, U)(T a, U b) { }

void main() {
auto a = new MyClass;
auto b = new MyClass; 
tfunc(a,b);// wrong mangling
}
- End of source

(Additional) I am using a tool to read build messages and map files, so such
unreadables are especially inconvenienced. And I want to write for profiler's
output, too.

Environment:
D2.055
Windows XP SP3 32-bit

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6831] mangled name over 128 characters becomes unreadable

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6831


Simen Kjaeraas simen.kja...@gmail.com changed:

   What|Removed |Added

 CC||simen.kja...@gmail.com


--- Comment #1 from Simen Kjaeraas simen.kja...@gmail.com 2011-10-19 12:57:08 
PDT ---
This is a limitation of the current linker. Until a linker comes around that
can handle humongous names, this will not be fixed. Walter is in the process of
rewriting the linker, so perhaps this will eventually be fixed, but don't hold
your breath.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5409] Disallow (!x y)

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5409



--- Comment #3 from bearophile_h...@eml.cc 2011-10-19 15:35:52 PDT ---
One more case found here, in the source code of the Chrome browser:
http://www.viva64.com/en/b/0113/

Fragment N3:

#define SEC_ASN1_CHOICE0x10

typedef struct sec_ASN1Template_struct {
  unsigned long kind; 
  ...
} SEC_ASN1Template;

PRBool SEC_ASN1IsTemplateSimple(
  const SEC_ASN1Template *theTemplate)
{
  ...
  if (!theTemplate-kind  SEC_ASN1_CHOICE) {
  ...
}



A related case (Fragment N4), that I think too is worth catching (probably it's
a less common bug):


bool GetPlatformFileInfo(...) {
  ...
  info-is_directory =
file_info.dwFileAttributes  FILE_ATTRIBUTE_DIRECTORY != 0;
  ...
}


The probably right code for Fragment N4:

info-is_directory =
  (file_info.dwFileAttributes  FILE_ATTRIBUTE_DIRECTORY) != 0;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6783] Implicit cast to immutable from pure function

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6783



--- Comment #3 from bearophile_h...@eml.cc 2011-10-19 15:46:43 PDT ---
See also:
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learnarticle_id=30167

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6832] Can't test objects wrapped with alias this

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6832



--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2011-10-19 
20:44:46 PDT ---
test.d(9): Error: incompatible types for ((bar) !is (null)): 'Bar' and
'void*'(In reply to comment #0)
 class Foo { }
 struct Bar { Foo foo; alias foo this; }
 void main()
 {
 Bar bar;
 bar = new Foo;  // ok
 assert(bar !is null);  // ng
 }

Error: incompatible types for ((bar) !is (null)): 'Bar' and 'void*'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6832] New: Can't test objects wrapped with alias this

2011-10-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6832

   Summary: Can't test objects wrapped with alias this
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2011-10-19 
20:44:16 PDT ---
class Foo { }
struct Bar { Foo foo; alias foo this; }
void main()
{
Bar bar;
bar = new Foo;  // ok
assert(bar !is null);  // ng
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---