1 2 3 Previous Next 31 Replies Latest reply: Sep 20, 2014 8:46 AM by user522630 RSS

    Assertions in 12.4 beta (How do we report crashes for 12.4 beta?)

    jthackray

      Hi,

       

      I received the following, when trying to compile our existing code that compiles with

      12.3 with the new -std=c++11 mode of 12.4 beta:

       

      >> Assertion:   (../lnk/overload.cc, line 3038)

          while processing some_source_code.cpp at line 700.

       

      Is there an official place to file bug reports?

       

      Thanks,

      Jonathan.

        • 1. Re: How do we report crashes in the 12.4 beta?
          jthackray

          And another crash:

           

          >> Assertion:   (../lnk/g3exceptionutils.cc, line 72)

              while processing /opt/SolarisStudio12.4-beta_mar14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.7.2/bits/locale_classes.h at line 424.

          • 2. Re: How do we report crashes in the 12.4 beta?
            Steve.Clamage-Oracle

            If you have a Studio service contract with Oracle, please report bugs through that channel.

            Otherwise, we will be happy to take your bug report if you can post a reasonably small test case here in the forum.

             

            But first, be sure to check the Release Notes and the What's New documents for limitations (such as the systems that are supported) and known problems (like C++11 headers that are known not to work in the Beta release).

            • 3. Re: Assertions in 12.4 beta (How do we report crashes for 12.4 beta?)
              Fedor-Oracle

              Both of these failures are rather unexpected ones.

              So if you could reduce them down to something "pastable" here or put them out in some public place,

              I would be happy to take a deep look.

               

              thanks in advance,

              __Fedor.

              • 4. Re: Assertions in 12.4 beta (How do we report crashes for 12.4 beta?)
                jthackray

                I'll see what I can do, but they're in the middle of complex, templated code. All this code compiles cleanly with 12.3, so they're both definite regressions from 12.3. Are there any extra flags I can supply to get a dump out of the compiler which might be useful for fixing these assertions?

                • 5. Re: Assertions in 12.4 beta (How do we report crashes for 12.4 beta?)
                  Fedor-Oracle

                  > All this code compiles cleanly with 12.3, so they're both definite regressions from 12.3

                   

                  As a side note - 12.3 was very loose wrt checking the validity of a template code, and as mentioned in 12.4 Beta "whats'new" we made the new compiler

                  much more standard compliant (and, in that regard, closer to modern g++ and clang).

                  As a direct consequence of that quite a bunch of invalid code that people were writing for 12.3 now will not compile with 12.4.

                   

                  Sure thing, assertions you show here are not intended as a standard compliance checks

                   

                  Though the first one might have come out after the error diagnostics about overloading ambiguity.

                   

                  > Are there any extra flags

                   

                  Unfortunately no.

                  In order to work on these we need to see how compiler got there and nothing is useful here except the source code.

                   

                  regards,

                  __Fedor.

                  • 6. Re: Assertions in 12.4 beta (How do we report crashes for 12.4 beta?)
                    jthackray

                    Hi,

                     

                    > As a side note - 12.3 was very loose wrt checking the validity of a template code, and as mentioned in 12.4 Beta "whats'new" we made the new compiler

                    > much more standard compliant (and, in that regard, closer to modern g++ and clang).

                     

                    That's good. However, this is code which compiles on both gcc-4.8 and clang-3.4 without issue.

                     

                    I've managed (after a few hours work) to chop it down to the following snippets of code (4 header files and a source .cpp file; no easy way to attach a tarball, so I've just run "cat" on each of them in turn).

                    Hope this helps you debug and fix this issue before the official 12.4 release.


                    Kind regards,

                    Jonathan.

                     

                    $ /opt/SolarisStudio12.4-beta_mar14-solaris-x86/bin/CC -std=c++11 -c assertion.cpp

                    >> Assertion:   (../lnk/overload.cc, line 3038)

                        while processing assertion.cpp at line 6.

                     

                    $ cat assertion.cpp

                    #include "foo.h"

                     

                    void foo()

                    {

                       String str;

                       Foo foo( str );

                    }

                     

                    $ cat foo.h

                    #ifndef __Z_Foo_H

                    #define __Z_Foo_H

                     

                    #include "string.h"

                     

                    class Foo {

                    public:

                       Foo( const char* );

                       Foo( const StringBase& );

                    };

                     

                    #endif /* __Z_Foo_H */

                     

                    $ cat string.h

                    #ifndef __Z_STRING_H

                    #define __Z_STRING_H

                     

                    #include "mutablestring.h"

                     

                    class String : public MutableString

                    {

                    public:

                       String();

                    };

                     

                    #endif

                     

                    $ cat mutablestring.h

                    #ifndef __Z_MUTABLESTRING_H

                    #define __Z_MUTABLESTRING_H

                     

                    #include "stringbase.h"

                     

                    class MutableString : public StringBase

                    {

                    public:

                       inline operator const char*() const;

                    };

                     

                    #endif

                     

                    $ cat stringbase.h

                    #ifndef __Z_STRINGBASE_H

                    #define __Z_STRINGBASE_H

                     

                    class StringBase

                    {

                    public:

                    };

                     

                    #endif

                    • 7. Re: Assertions in 12.4 beta (How do we report crashes for 12.4 beta?)
                      jthackray

                      Here's the other assertion. Very easy to replicate. We don't use C++ exceptions, so it requires the -noex flag:

                       

                      $ /opt/SolarisStudio12.4-beta_mar14-solaris-x86/bin/CC -noex -std=c++11 -c unittest.cpp

                      >> Assertion:   (../lnk/g3exceptionutils.cc, line 72)

                          while processing /opt/SolarisStudio12.4-beta_mar14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.7.2/bits/locale_classes.h at line 424.

                       

                      $ cat unittest.cpp

                      #include <iostream>

                       

                      That's it.

                      Kind regards,

                      Jonathan.

                      • 8. Re: Assertions in 12.4 beta (How do we report crashes for 12.4 beta?)
                        Fedor-Oracle

                        > I've managed (after a few hours work) to chop it down to the following snippets of code


                        Your effort is much appreciated!

                        This both are clearly bugs in -std=c++11 support of 12.4 Beta.

                        Bug reports filed:

                        • 18496227 assert on unintended overloading ambiguity with C++11 move constructor
                        • 18496304 -noex -std=c++11 fails with assertion on <iostream>

                         

                        There seems to be no workaround for the first bug.

                        Workaround for the latter one is obvious - drop -noex when compiling with -std=c++11.


                        regards,

                        __Fedor.

                        • 9. Re: Assertions in 12.4 beta (How do we report crashes for 12.4 beta?)
                          user522630

                          Hi __Fedor,

                           

                           

                          When compiling Firefox 24.5 ESR, it triggers the same assertion error on locale_classes.h when compiling Decimal.cpp using 12.4 Beta. I could not produce a sample of the code that triggers the assertion error. This code compiles fine on gcc-4.8.

                           

                           

                          Here is the C++ flags used for compiling. The option -noex is not used here.

                           

                          CXXFLAGS=-std=c++11 -xannotate=no -mt -xO4 -Qoption iropt -Rloop_reform

                           

                           

                          Regards,

                          Brian

                          • 10. Re: Assertions in 12.4 beta (How do we report crashes for 12.4 beta?)
                            Steve.Clamage-Oracle

                            I'm happy to say that both bugs you reported have been fixed, and the next compiler update will have those fixes. It is likely that the problem compiling Firefox will also be fixed. Please try again when the next update is available. (Sorry, I can't say exactly when, but it won't be long.)

                            • 11. Re: Assertions in 12.4 beta (How do we report crashes for 12.4 beta?)
                              Fedor-Oracle

                              I'm unable to reproduce assertion on local_classes.h compiling mfbt/decimal/Decimal.cpp from current mozilla-central repository.

                              With current development compiler I'm able to compile it cleanly.

                               

                              If assertion happens in g3exceptionutils.cc then it should go away without -noex.

                              If it still remains there then it is yet another bug.


                              regards,

                                Fedor.

                              • 12. Re: Assertions in 12.4 beta (How do we report crashes for 12.4 beta?)
                                user522630

                                Hi Fedor,

                                 

                                I have downloaded the Mozilla Firefox 24.5 ESR Release, in addition to Solaris Studio 12.4 Beta. The compilation was done on the 24.5 ESR Release under Solaris 11.2 Beta, using the CXXFLAGS quoted in my previous reply. The assertion error  on local_classes.h still occurs, even without -noex flag.

                                 

                                I will try to use the current mozilla-central repository to perform the compilation and see whether the assertion error goes away.

                                 

                                Regards,

                                Brian

                                • 13. Re: Assertions in 12.4 beta (How do we report crashes for 12.4 beta?)
                                  user522630

                                  Hi Fedor,

                                   

                                  I have just used the current comm-central and mozilla-central repository and the assertion error still occurs on local_classes.h, even without -noex flag. Here is the link for the text file containing the assertion error: https://dl.dropboxusercontent.com/u/6899028/assertionError.txt.

                                   

                                  Regards,

                                  Brian

                                  • 14. Re: Assertions in 12.4 beta (How do we report crashes for 12.4 beta?)
                                    Fedor-Oracle

                                    Ah, thats a relief. Thanks for sharing a log.

                                    The world is not ripped apart - this compilation *does* use no-exception mode.

                                    We have two alternative spellings of it:

                                      -noex

                                      -features=no%except

                                     

                                    Mozilla compilation uses the latter and thus hits 18496304.

                                    Should be fixed in the upcoming Beta 2.

                                     

                                    regards,

                                      Fedor.

                                    1 2 3 Previous Next