incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r564002 - /incubator/stdcxx/trunk/util/exec.cpp
Date Wed, 08 Aug 2007 20:39:16 GMT
I see you chose to map STATUS_INVALID_PARAMETER to SIGSYS. That
does seem like a better solution than inventing our own mnemonic.

POSIX describes SIGSYS as "Bad system call," meaning that the
system call that was made was invalid (i.e., ENOSYS), but it
looks like it has also been interpreted to mean that an argument
to a valid system call was invalid. Here's a discussion on the
subject on the Austin Group (POSIX) mailing list:

http://www.opengroup.org/austin/mailarchives/ag/msg00179.html

Martin

faridz@apache.org wrote:
> Author: faridz
> Date: Wed Aug  8 12:31:00 2007
> New Revision: 564002
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=564002
> Log:
> 2007-08-08 Farid Zaripov <Farid_Zaripov@epam.com>
> 
> 	* exec.cpp [_WIN32]: Added mappings of the STATUS_STACK_OVERFLOW and
> 	STATUS_INVALID_PARAMETER.
> 
> Modified:
>     incubator/stdcxx/trunk/util/exec.cpp
> 
> Modified: incubator/stdcxx/trunk/util/exec.cpp
> URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/exec.cpp?view=diff&rev=564002&r1=564001&r2=564002
> ==============================================================================
> --- incubator/stdcxx/trunk/util/exec.cpp (original)
> +++ incubator/stdcxx/trunk/util/exec.cpp Wed Aug  8 12:31:00 2007
> @@ -55,6 +55,12 @@
>  #  ifndef SIGBUS
>  #    define SIGBUS  10  // STATUS_IN_PAGE_ERROR translated into SIGBUS
>  #  endif
> +#  ifndef SIGSYS
> +#    define SIGSYS  12  // STATUS_INVALID_PARAMETER translated into SIGSYS
> +#  endif
> +#  ifndef STATUS_INVALID_PARAMETER
> +#    define STATUS_INVALID_PARAMETER  ((DWORD)0xC000000DL)
> +#  endif
>  #endif
>  #include <sys/stat.h> /* for S_* */
>  #include <sys/types.h>
> @@ -862,6 +868,7 @@
>  } nt_status_map [] = {
>      { STATUS_BREAKPOINT,              SIGTRAP },
>      { STATUS_ACCESS_VIOLATION,        SIGSEGV },
> +    { STATUS_STACK_OVERFLOW,          SIGSEGV },
>      { STATUS_IN_PAGE_ERROR,           SIGBUS  },
>      { STATUS_ILLEGAL_INSTRUCTION,     SIGILL  },
>      { STATUS_PRIVILEGED_INSTRUCTION,  SIGILL  },
> @@ -873,7 +880,8 @@
>      { STATUS_FLOAT_STACK_CHECK,       SIGFPE  },
>      { STATUS_FLOAT_UNDERFLOW,         SIGFPE  },
>      { STATUS_INTEGER_DIVIDE_BY_ZERO,  SIGFPE  },
> -    { STATUS_INTEGER_OVERFLOW,        SIGFPE  }
> +    { STATUS_INTEGER_OVERFLOW,        SIGFPE  },
> +    { STATUS_INVALID_PARAMETER,       SIGSYS  }
>  };
>  
>  
> 
> 


Mime
View raw message