Issue 14896 - x64 synchronized problem when using -O
Summary: x64 synchronized problem when using -O
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Windows
: P1 blocker
Assignee: No Owner
URL:
Keywords: backend, wrong-code
Depends on:
Blocks:
 
Reported: 2015-08-10 10:29 UTC by ponce
Modified: 2020-12-19 01:48 UTC (History)
3 users (show)

See Also:


Attachments
Click on batch files and inspect the PNG to reproduce (355.92 KB, application/zip)
2015-08-10 10:29 UTC, ponce
Details

Note You need to log in before you can comment on or make changes to this issue.
Description ponce 2015-08-10 10:29:20 UTC
Created attachment 1539 [details]
Click on batch files and inspect the PNG to reproduce

So i've had problems with font rendering in a plugin program and made a test case that can reproduce the problem stand-alone.

DMD version: v2.068.0-rc1
OS version: Windows 8

The test case provide two .bat files to run it exposing or not the problem.
The output is a PNG file that contains text if the bug isn't there.
Unfortunately the code is still large, but I'm pretty sure the problem is somewhere in stb_truetype.d

The bug only shows with both -m64 and -O.


It can be work-arounded by removing -O for some modules. But still it prevents to build projects all-at-once and it's time-consuming process.

If you need additional informations just ask.
Comment 1 ponce 2015-08-10 11:29:30 UTC
Also happens with DMD v2.068.0
Comment 2 ponce 2015-08-10 12:27:12 UTC
How I work-around this bug today: disabling -O for font.d and compiling it separately.
Comment 3 ponce 2015-08-19 08:34:25 UTC
Why no answer? Is there a problem with this report?
Comment 4 ag0aep6g 2015-08-19 12:45:33 UTC
(In reply to ponce from comment #3)
> Why no answer? Is there a problem with this report?

You generally don't get a response unless something is happening. I.e., no "thank you for your bug report" kind of messages.

The test case is pretty large. It will probably have to be reduced further before work on a fix can begin. This may be something you can do to drive things forward.
Comment 5 ponce 2015-08-23 17:51:27 UTC
Can't reproduce on Mac OS X, odd.
Comment 6 ponce 2015-08-23 19:46:00 UTC
Removing the synchronized(this) in font.d:L118 removes the bug. It doesn't seem related to codegen afterall.
Comment 7 Vladimir Panteleev 2015-09-01 08:39:36 UTC
Have you had any success with DustMite?
Comment 8 ponce 2015-09-01 09:00:52 UTC
Haven't tried.
Comment 9 Walter Bright 2020-09-03 08:17:14 UTC
(In reply to ponce from comment #8)
> Haven't tried.

Is the problem still there?
Comment 10 ponce 2020-12-19 01:48:13 UTC
No, doesn't happen with v2.094.0
Very probably fixed since. This can be closed.