h0wl / pdfium

Automatically exported from code.google.com/p/pdfium
1 stars 1 forks source link

The latest check in (third_party\numerics) cause compilation failure #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Compile the latest code on windows.

What is the expected output? What do you see instead?
build success; 
build failed.

What version of the product are you using? On what operating system?
pdfium / pdfium / master
commit  9108ad211bf00d6e512af0919b743c1bf8b0eeb8[log][tgz]  
author Chris Palmer <palmer@google.com> Thu Jun 26 16:01:46 2014 -0700
committer Chris Palmer <palmer@google.com> Thu Jun 26 16:01:46 2014 -0700

On 64bit windows 7, MS VC++ 10.0, Project configuration is Win32.

Please provide any additional information below.

I modify the code:

  static RangeConstraint Check(Src value) {
    return GetRangeConstraint(value <= std::numeric_limits<Dst>::max(), true);
  }

to:

  static RangeConstraint Check(Src value) {
 // reture GetRangeConstraint(value <= std::numeric_limits<Dst>::max(), true);
    return RANGE_VALID; 
  }

the build succeeded.

Original issue reported on code.google.com by luster...@gmail.com on 28 Jun 2014 at 9:13

Attachments:

GoogleCodeExporter commented 9 years ago
@palmer, can you take a look at this one?

Original comment by bo...@foxitsoftware.com on 28 Jun 2014 at 7:18

GoogleCodeExporter commented 9 years ago
Bo, can I get Edit Bug permission for pdfium? I'll assign this one to myself.

Original comment by pal...@chromium.org on 28 Jun 2014 at 8:14

GoogleCodeExporter commented 9 years ago
Not sure how to give Edit Bug permission. Maybe @jam can help?

Original comment by bo...@foxitsoftware.com on 28 Jun 2014 at 8:21

GoogleCodeExporter commented 9 years ago
palmer: I gave you edit rights. 

Original comment by jabdelmalek@google.com on 28 Jun 2014 at 8:25

GoogleCodeExporter commented 9 years ago
I would assume WontFix. We don't support MSVS 2010 because it has too many bugs 
for us to work around. My suggestion is to use a current version of Visual 
Studio, because the code change listed above is functionally incorrect and 
would introduce security vulnerabilities.

Original comment by jschuh@chromium.org on 28 Jun 2014 at 9:20

GoogleCodeExporter commented 9 years ago
You mean this is a compiler BUG? 
Actually,there is only this ONE error under MSVS 2010(others are warning), and 
the error is appeared only in the newly introduced "numerics" library.
I still hope you can fix it, thanks!

Original comment by luster...@gmail.com on 29 Jun 2014 at 5:03

GoogleCodeExporter commented 9 years ago
It looks like only the standalone build is broken 
(https://code.google.com/p/pdfium/wiki/Build). We need to maintain that 
configuration as well. It's probably some compiler flags need to be added to 
pdfium\build\standalone.gypi to match whatever's chromium's build\common.gypi 
does.

Original comment by jam@chromium.org on 29 Jun 2014 at 8:05

GoogleCodeExporter commented 9 years ago

Original comment by jam@chromium.org on 29 Jun 2014 at 8:05

GoogleCodeExporter commented 9 years ago
ok I just compared the args to cl and found that we need to specify /D 
"NOMINMAX" for the stand alone build. I'll take care of it.

Original comment by jam@chromium.org on 30 Jun 2014 at 3:29

GoogleCodeExporter commented 9 years ago

Original comment by jam@chromium.org on 30 Jun 2014 at 4:27