Faculty of Information Technology
Software Engineering Group

Opened 3 months ago

Last modified 2 months ago

#253 new defect

Win32OperatingSystem errorHolderForNumber - System Error Codes are reporting Posix values!

Reported by: Patrik Svestka Owned by:
Priority: critical Milestone:
Component: default Keywords:
Cc: Also affects CVS HEAD (eXept version): no

Description (last modified by Patrik Svestka)

I have stumbled on this one by accident as I was trying to catch a windows error. I found out that the errors reported are Posix ones and not the System Error Codes!

To have a list of windows system errors:
https://docs.microsoft.com/en-us/windows/desktop/debug/system-error-codes--0-499-

Now Windows reports Posix errors:


First example:
Win32OperatingSystem errorHolderForNumber:1

is reporting:
OSErrorHolder(EPERM, noPermissionsSignal)

The correct value should be:
OSErrorHolder(ERROR_INVALID_FUNCTION, illegalOperationSignal)


Second example from higher errno:
Win32OperatingSystem errorHolderForNumber:87

is currenty reporting:
OSErrorHolder(ERROR_OTHER, defaultOsErrorSignal)

The correct value should be:
OSErrorHolder(ERROR_INVALID_PARAMETER, invalidArgumentsSignal)

Attachments (1)

RegressionTests__Win32OperatingSystemTest-test-errorMessages.st (2.3 KB) - added by Patrik Svestka 2 months ago.
Tests for: ERROR_INVALID_ADDRESS, ERROR_INVALID_FUNCTION, ERROR_INVALID_PARAMETER System Error Codes

Download all attachments as: .zip

Change History (4)

comment:1 Changed 3 months ago by Patrik Svestka

Summary: System Error Codes codes are reporting Posix values!Win32OperatingSystem errorHolderForNumber - System Error Codes are reporting Posix values!

comment:2 Changed 3 months ago by Patrik Svestka

Description: modified (diff)

comment:3 Changed 2 months ago by Patrik Svestka

I have prepared a 3 tests for first, around middle and last System error codes. Correctly you should have covered all the System Error Codes.

Changed 2 months ago by Patrik Svestka

Tests for: ERROR_INVALID_ADDRESS, ERROR_INVALID_FUNCTION, ERROR_INVALID_PARAMETER System Error Codes

Note: See TracTickets for help on using tickets.