New issue
Advanced search Search tips

Issue 776946 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 746956



Sign in to add a comment

opentype-sanitiser.h #defines htons and others, breaking jumbo builds

Project Member Reported by brucedaw...@chromium.org, Oct 20 2017

Issue description

When third_party\WebKit\Source\platform\fonts\WebFontDecoder.cpp #includes third_party/ots/include/ots-memory-stream.h it pulls in opentype-sanitiser.h which causes ntohl, ntohs, htonl and htons to be #defined. Later on, in jumbo builds, when third_party\webkit\source\platform\wtf\byteorder.h is #included this causes problems because byteorder.h tries to define these as functions.

Possible solutions include:

1) #undef these at the end of opentype-sanitiser.h
2) #undef these in WebFontDecoder.cpp after including ots-memory-stream.h
3) Excluded WebFontDecoder.cpp from jumbo builds

Solution #1 is the most long-term stable solution. Thoughts?

 
Note: solution #1 doesn't actually work because, for instance, third_party\ots\src\ots.h needs ntohs.
Note: I only ran across this because I set jumbo_file_merge_limit = 10. It doesn't seem to happen at the default levels - I'm not entirely sure why.
This is my attempt at implementing solution #1.

https://chromium-review.googlesource.com/c/chromium/src/+/730774
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c8759984e5db8c4059cabde5ffc13fee8c654468

commit c8759984e5db8c4059cabde5ffc13fee8c654468
Author: Bruce Dawson <brucedawson@chromium.org>
Date: Tue Oct 24 23:24:25 2017

Remove unneeded ntohs/etc. #defines

When using jumbo builds these defines can potentially cause build
failures/warnings when these are later declared as actual functions.
And, these #defines appear to be unneeded. These defines weren't
causing actual failures but they were noticed when looking at some
other ntohs defines that were causing problems. So, this is a
preemptive fix.

Bug:  776946 
Change-Id: I9301a6c9b1935208bc022247268175eb26c9a174
Reviewed-on: https://chromium-review.googlesource.com/731515
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511300}
[modify] https://crrev.com/c8759984e5db8c4059cabde5ffc13fee8c654468/ppapi/shared_impl/private/net_address_private_impl.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8

commit 6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8
Author: Kunihiko Sakamoto <ksakamoto@chromium.org>
Date: Thu Oct 26 09:55:26 2017

Update OTS to fbe8db1

This updates OTS from 010db68e (Aug 2) to fbe8db1 (Oct 25).

Notable changes (from https://github.com/khaledhosny/ots/releases):

[ots] Improve warnings and error messages.
[ots] Don’t reject fonts with malformed table tags, the tables themselves are still dropped.
[glyf] Allow simple glyph flag bit 6 to be set
[glyf] Allow empty, none-zero size table.
[glyf] Accept glyphs with 0 numberOfContours.
[glyf] Sanitize composite glyphs.
[glyf] Don’t reject glyphs with extra data at end.
[post] Correctly parse the header for all table versions.
[layout] Relax GSUB/GPOS DFLT table requirements, after the update in OpenType 1.8.2 spec.

Bug:  776946 
Change-Id: I8a08b996e8ddde41fbf000a40e758d9b7acb1570
Reviewed-on: https://chromium-review.googlesource.com/737738
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511776}
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/INSTALL
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/Makefile.am
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/README.chromium
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/configure.ac
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/include/opentype-sanitiser.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/cff.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/cff.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/cmap.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/cmap.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/cvt.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/cvt.h
[add] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/feat.cc
[add] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/feat.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/fpgm.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/fpgm.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/gasp.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/gasp.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/gdef.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/gdef.h
[add] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/glat.cc
[add] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/glat.h
[add] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/gloc.cc
[add] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/gloc.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/glyf.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/glyf.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/gpos.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/gpos.h
[add] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/graphite.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/gsub.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/gsub.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/hdmx.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/hdmx.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/head.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/head.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/hhea.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/hhea.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/hmtx.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/hmtx.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/kern.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/kern.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/layout.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/loca.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/loca.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/ltsh.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/ltsh.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/math.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/math_.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/maxp.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/maxp.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/metrics.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/metrics.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/name.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/name.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/os2.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/os2.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/ots.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/ots.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/post.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/post.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/prep.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/prep.h
[add] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/sile.cc
[add] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/sile.h
[add] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/silf.cc
[add] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/silf.h
[add] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/sill.cc
[add] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/sill.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/vdmx.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/vdmx.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/vhea.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/vhea.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/vmtx.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/vmtx.h
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/vorg.cc
[modify] https://crrev.com/6904bbe0ea0f113b6d1fe7374ea67bc7a279b1c8/third_party/ots/src/vorg.h

Status: Fixed (was: Untriaged)

Sign in to add a comment