Bug 692833

Summary: Ghostscript differences: gcc vs. clang
Product: Ghostscript Reporter: Marcos H. Woehrmann <marcos.woehrmann>
Component: Build ProcessAssignee: Marcos H. Woehrmann <marcos.woehrmann>
Status: RESOLVED WORKSFORME    
Severity: normal CC: henry.stiles
Priority: P4    
Version: master   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Bug Depends on:    
Bug Blocks: 692770    

Description Marcos H. Woehrmann 2012-02-01 23:02:09 UTC
In Comment #5 for Bug 692770 <http://bugs.ghostscript.com/show_bug.cgi?id=692770#c5> I mentioned that Ghostscript compiled with clang generates different output for a file than Ghostscript compiled with gcc.

I've now gone ahead and compared clang vs. gcc compiled Ghostscript for the entire regression test suite and found differences in the following files when converted directly to bitmaps:

tests_private__comparefiles__046-01.ps (page 1)
tests_private__comparefiles__276-01.ps (page 1)
tests_private__comparefiles__Bug689006.pdf (page 1)
tests_private__comparefiles__Bug690179.pdf (page 1)
tests_private__ps__ps3cet__09-30.PS (page 5)
tests_private__ps__ps3cet__09-31.PS (page 10)
tests_private__ps__ps3cet__09-41.PS (page 4)
tests_private__ps__ps3cet__09-48.PS (page 4)

and in these files when converted to PDF via pdfwrite and then to bitmap:

tests_private__comparefiles__Bug692634.ps (page 1)
tests_private__ps__ps3cet__18-02G.PS (page 3)

I've attached a .tar file with  scaled bitmaps of the files with differences.  The left third is the file processed by gcc compiled Ghostscript, the middle third is the file processed by clang compiled Ghostscript, and the right third is the difference.
Comment 2 Marcos H. Woehrmann 2012-02-05 00:24:19 UTC
In addition to differences in output with the clang compiled gs vs  the gcc compiled gcc, these test files seg fault with the clang compiled gcc:

tests_private__comparefiles__Bug692634.ps
tests_private__ps__ps3cet__09-02.PS
tests_private__ps__ps3cet__09-28.PS
tests_private__ps__ps3cet__09-29.PS
tests_private__ps__ps3cet__09-52.PS
Comment 3 Marcos H. Woehrmann 2015-11-26 20:43:56 UTC
With the current code, 5596cc435aec8387ddd2e64437f1f9486f3ee5c6, the differences from comment #0 and the segfaults from comment #2 no longer occur.