Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-938

[aCC 363/HP 11.11] SEGV in 22.locale.*.mt

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.2.2
    • Test Driver
    • None
    • HP-UX B.11.11 U
      aCC: HP ANSI C++ B3910B A.03.63

    • Incorrect Behavior

    Description

      I've reduced the problem to the following testcase...

      [vitek@jenga tests]$ cat t.cpp; aCC -g t.cpp; gdb a.out
      extern "C" {
        typedef void rw_signal_handler_t (int);
      }
      
      rw_signal_handler_t* const rw_sig_ign = (rw_signal_handler_t*)-2;
      
      unsigned rw_alarm (rw_signal_handler_t* handler)
      {
        if (rw_sig_ign == handler) {
          return 4;
        }
      
        else if (handler) {
          return 5;
        }
      
        return 0;
      }
      
      extern "C" {
        void my_signal_handler (int) { }
      }
      
      int main ()
      {
        rw_alarm (my_signal_handler);
      
        return 0;
      }
      HP gdb 5.0 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00
      and target hppa1.1-hp-hpux11.00.
      Copyright 1986 - 2001 Free Software Foundation, Inc.
      Hewlett-Packard Wildebeest 5.0 (based on GDB) is covered by the
      GNU General Public License. Type "show copying" to see the conditions to
      change it and/or distribute copies. Type "show warranty" for warranty/support.
      ..
      (gdb) run
      Starting program: /build/vitek/4.2.2/12s/tests/a.out 
      
      Program received signal SIGSEGV, Segmentation fault
        si_code: 0 - SEGV_UNKNOWN - Unknown Error.
      0x2d60 in rw_alarm (handler=0x4000113a <my_signal_handler>) at t.cpp:9
      9         if (rw_sig_ign == handler) {
      (gdb) where
      #0  0x2d60 in rw_alarm (handler=0x4000113a <my_signal_handler>) at t.cpp:9
      #1  0x2df0 in main () at t.cpp:26
      

      Attachments

        Activity

          People

            vitek Travis Vitek
            vitek Travis Vitek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h