Bug 1087075 - GCC 8: texlive tests fail
GCC 8: texlive tests fail
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem
Current
Other Other
: P5 - None : Minor (vote)
: ---
Assigned To: Dr. Werner Fink
E-mail List
:
Depends on:
Blocks: 1084649
  Show dependency treegraph
 
Reported: 2018-03-27 13:00 UTC by Martin Liška
Modified: 2018-10-24 22:46 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2018-03-27 13:00:55 UTC
Build the package with GCC 8, there's a test error:

[ 1209s] Testsuite summary for LCDF typetools (TeX Live) 2.106
[ 1209s] ============================================================================
[ 1209s] # TOTAL: 3
[ 1209s] # PASS:  2
[ 1209s] # SKIP:  0
[ 1209s] # XFAIL: 0
[ 1209s] # FAIL:  1
[ 1209s] # XPASS: 0
[ 1209s] # ERROR: 0

It's caused by following undefined behavior:

../../../../../texk/lcdf-typetools/lcdf-typetools-src/libefont/t1rw.cc:120:35: runtime error: signed integer overflow: 55898 * 52845 cannot be represented in type 'int'
    #0 0x42634d in Efont::Type1Reader::eexec(int) ../../../../../texk/lcdf-typetools/lcdf-typetools-src/libefont/t1rw.cc:120
    #1 0x42634d in Efont::Type1Reader::start_eexec(int) ../../../../../texk/lcdf-typetools/lcdf-typetools-src/libefont/t1rw.cc:202
    #2 0x42722a in Efont::Type1Reader::switch_eexec(bool, unsigned char*, int) ../../../../../texk/lcdf-typetools/lcdf-typetools-src/libefont/t1rw.cc:88
    #3 0x41cd9c in Efont::Type1Font::read(Efont::Type1Reader&) ../../../../../texk/lcdf-typetools/lcdf-typetools-src/libefont/t1font.cc:280
    #4 0x41bd0b in Efont::Type1Font::Type1Font(Efont::Type1Reader&) ../../../../../texk/lcdf-typetools/lcdf-typetools-src/libefont/t1font.cc:57
    #5 0x4048d9 in do_file ../../../../../texk/lcdf-typetools/lcdf-typetools-src/t1dotlessj/t1dotlessj.cc:260
    #6 0x4048d9 in main ../../../../../texk/lcdf-typetools/lcdf-typetools-src/t1dotlessj/t1dotlessj.cc:355
    #7 0x7ffff63e60ea in __libc_start_main (/lib64/libc.so.6+0x230ea)
    #8 0x405299 in _start (/home/abuild/rpmbuild/BUILD/texlive/world/texk/lcdf-typetools/lcdf-typetools-src/t1dotlessj/t1dotlessj+0x405299)
Comment 1 Dr. Werner Fink 2018-04-19 06:08:57 UTC
And why has gcc7 accepted this? And since when gcc8 is standard in Tumbleweed?
Comment 2 Dr. Werner Fink 2018-04-19 06:16:20 UTC
Current TeXLive 2017

texlive-20170520-source/texk/lcdf-typetools/lcdf-typetools-src/libefont/t1rw.cc

 inline int
 Type1Reader::eexec(int c)
 {
     unsigned char answer = (unsigned char)(c ^ (_r >> 8));
     _r = (((unsigned char)c + _r) * t1C1 + t1C2) & 0xFFFF;
     return answer;
 }


Next TeXLive 2018 I'm working on

 inline int
 Type1Reader::eexec(int c)
 {
     unsigned char answer = (unsigned char)(c ^ (_r >> 8));
     _r = (((unsigned char)c + _r) * (uint32_t) t1C1 + t1C2) & 0xFFFF;
     return answer;
 }

both with

 enum Type1Defs {
     t1Warmup_ee = 4,
     t1R_ee      = 55665,
     t1R_cs      = 4330,
     t1C1        = 52845,
     t1C2        = 22719
 };

defined in ...texk/lcdf-typetools/lcdf-typetools-src/include/efont/t1cs.hh
Comment 3 Martin Liška 2018-04-19 07:46:29 UTC
(In reply to Dr. Werner Fink from comment #1)
> And why has gcc7 accepted this? And since when gcc8 is standard in
> Tumbleweed?

Because GCC7 was not so aggressive in optimizing that.
GCC 8 will be release in a few weeks and we've been preparing for Staging project to have it in Factory as soon as it will be released.

Nice article about UBSAN and what compiler can do with that:
https://developers.redhat.com/blog/2014/10/16/gcc-undefined-behavior-sanitizer-ubsan/
Comment 4 Martin Liška 2018-04-19 07:59:15 UTC
(In reply to Dr. Werner Fink from comment #2)
> Current TeXLive 2017
> 
> texlive-20170520-source/texk/lcdf-typetools/lcdf-typetools-src/libefont/t1rw.
> cc
> 
>  inline int
>  Type1Reader::eexec(int c)
>  {
>      unsigned char answer = (unsigned char)(c ^ (_r >> 8));
>      _r = (((unsigned char)c + _r) * t1C1 + t1C2) & 0xFFFF;
>      return answer;
>  }
> 
> 
> Next TeXLive 2018 I'm working on
> 
>  inline int
>  Type1Reader::eexec(int c)
>  {
>      unsigned char answer = (unsigned char)(c ^ (_r >> 8));
>      _r = (((unsigned char)c + _r) * (uint32_t) t1C1 + t1C2) & 0xFFFF;
>      return answer;
>  }
> 
> both with
> 
>  enum Type1Defs {
>      t1Warmup_ee = 4,
>      t1R_ee      = 55665,
>      t1R_cs      = 4330,
>      t1C1        = 52845,
>      t1C2        = 22719
>  };
> 
> defined in ...texk/lcdf-typetools/lcdf-typetools-src/include/efont/t1cs.hh

Yes, that's correct. Added here:
https://github.com/kohler/lcdf-typetools/commit/3118d2d45dcb605193e756fbda32dc186c2b267f

with commit message:
Remove undefined behaviors.

Can you please backport this patch to Factory version of the package?
Or will you bump to a newer version?
Comment 5 Dr. Werner Fink 2018-04-19 08:54:36 UTC
(In reply to Martin Liška from comment #4)

> Yes, that's correct. Added here:
> https://github.com/kohler/lcdf-typetools/commit/
> 3118d2d45dcb605193e756fbda32dc186c2b267f
> 
> with commit message:
> Remove undefined behaviors.
> 
> Can you please backport this patch to Factory version of the package?
> Or will you bump to a newer version?

This is the question as I'm currentky waiting on TeXLive 2018 final release.
The pretestes do build here but, as usual, there will be always problems with the next version like incompatibilities with other packages or missed upstream dependencies or missing perl packages (SR#596063 and SR#596059 are still not approved nor reviewed)
Comment 6 Richard Biener 2018-04-19 09:02:46 UTC
(In reply to Dr. Werner Fink from comment #5)
> (In reply to Martin Liška from comment #4)
> 
> > Yes, that's correct. Added here:
> > https://github.com/kohler/lcdf-typetools/commit/
> > 3118d2d45dcb605193e756fbda32dc186c2b267f
> > 
> > with commit message:
> > Remove undefined behaviors.
> > 
> > Can you please backport this patch to Factory version of the package?
> > Or will you bump to a newer version?
> 
> This is the question as I'm currentky waiting on TeXLive 2018 final release.
> The pretestes do build here but, as usual, there will be always problems
> with the next version like incompatibilities with other packages or missed
> upstream dependencies or missing perl packages (SR#596063 and SR#596059 are
> still not approved nor reviewed)

Given that with continuous integration the texlive build failure blocks adoption of GCC8 and thus a timely fix is appreciated.
Comment 7 Swamp Workflow Management 2018-04-19 10:00:06 UTC
This is an autogenerated message for OBS integration:
This bug (1087075) was mentioned in
https://build.opensuse.org/request/show/598470 Factory / texlive
Comment 8 Dr. Werner Fink 2018-04-24 10:02:45 UTC
SR#598470
Comment 9 Swamp Workflow Management 2018-05-03 12:20:06 UTC
This is an autogenerated message for OBS integration:
This bug (1087075) was mentioned in
https://build.opensuse.org/request/show/603649 Factory / texlive
Comment 10 Swamp Workflow Management 2018-05-03 17:00:05 UTC
This is an autogenerated message for OBS integration:
This bug (1087075) was mentioned in
https://build.opensuse.org/request/show/603807 Factory / texlive
Comment 11 Swamp Workflow Management 2018-05-04 08:30:05 UTC
This is an autogenerated message for OBS integration:
This bug (1087075) was mentioned in
https://build.opensuse.org/request/show/603937 Factory / texlive
Comment 12 Swamp Workflow Management 2018-05-07 12:00:06 UTC
This is an autogenerated message for OBS integration:
This bug (1087075) was mentioned in
https://build.opensuse.org/request/show/605086 Factory / texlive
Comment 13 Swamp Workflow Management 2018-05-08 15:10:05 UTC
This is an autogenerated message for OBS integration:
This bug (1087075) was mentioned in
https://build.opensuse.org/request/show/605376 Factory / texlive
Comment 14 Swamp Workflow Management 2018-05-11 09:10:06 UTC
This is an autogenerated message for OBS integration:
This bug (1087075) was mentioned in
https://build.opensuse.org/request/show/606362 Factory / texlive
Comment 17 Swamp Workflow Management 2018-08-24 19:11:10 UTC
SUSE-RU-2018:2497-1: An update that has two recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1087075,1099563
CVE References: 
Sources used:
SUSE Linux Enterprise Module for Desktop Applications 15 (src):    texlive-2017.20170520-11.5.4
Comment 18 Swamp Workflow Management 2018-08-26 19:10:48 UTC
openSUSE-RU-2018:2517-1: An update that has two recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1087075,1099563
CVE References: 
Sources used:
openSUSE Leap 15.0 (src):    texlive-2017.20170520-lp150.9.3.1