[Issue 16631] New: Program crash when a version activates a method defined in a static library
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Oct 20 23:24:34 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16631
Issue ID: 16631
Summary: Program crash when a version activates a method
defined in a static library
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: critical
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: b2.temp at gmx.com
A program crashes when it's linked with a static library and if a version
specification is used to activate the protected method of a class.
reproduction:
=== lib.d ===
module lib;
class Foo
{
protected void bug(){}
protected version(bug) void conditionalBug(){}
void test() {bug;}
}
=============
=== main.d ===
module main;
import lib;
void main()
{
(new Foo).test;
}
==============
=== test.sh ====
dmd lib.d -lib
dmd main.d lib.a -version=bug
./main
================
output:
./test.sh : ligne 3 : 3096 Erreur de segmentation ./main
This is caused by the front end because the same error appends with latest
stable LDC. Latest stable DMD is affected, latest beta too.
--
More information about the Digitalmars-d-bugs
mailing list