-
Notifications
You must be signed in to change notification settings - Fork 716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash attempting to query AIS card #824
Comments
You could try running this on Unix in gdb or similar. This would tell the exact place where the program crashes... |
I traced the source code and I think I can safely say that it crashed when calling module_init from dll-tool.dll. |
I meant smm-local.dll |
On Win7-64x with the latest release I do not have such problems. |
I do not have problems on Win10-64 with the latest release. SM module is loaded and correctly used to manage protected application. Have you used the same release? |
Well, taking into consideration this remark, I also have segfault. |
Issue OpenSC#824 In Windows, file handles (including 'stderr', 'stdout') can not be shared between DLL-s, and so, the log handle (File *), defined in one module, cannot be reused in another. That is the situation when, for example, the SM is processed in external, dynamically loadable module as it currently implemented for IAS/ECC card. That's for the configuration option 're-open of log file on each message' was introduced. This 're-open' logic has not been tested in the particular case of opensc-* tools used with verbose log into 'stderr' -- in dynamically loaded module the 'stderr' handle, defined in the 'main' module, was not recognized as 'stderr' and there was an attempt to close it.
Issue OpenSC#824 In Windows, file handles (including 'stderr', 'stdout') can not be shared between DLL-s, and so, the log handle (File *), defined in one module, cannot be reused in another. That is the situation when, for example, the SM is processed in external, dynamically loadable module as it currently implemented for IAS/ECC card. That's for the configuration option 're-open of log file on each message' was introduced. This 're-open' logic has not been tested in the particular case of opensc-* tools used with verbose log into 'stderr' -- in dynamically loaded module the 'stderr' handle, defined in the 'main' module, was not recognized as 'stderr' and there was an attempt to close it.
remove the user configuration option reopen_debug_file and instead handle the underlying problem internally. File handles may not be shared among DLLs, so we reopen the debug file descriptor once when loading a module that OpenSC's internal debugging. Fixes OpenSC#824 Closes OpenSC#910
Issue #824 In Windows, file handles (including 'stderr', 'stdout') can not be shared between DLL-s, and so, the log handle (File *), defined in one module, cannot be reused in another. That is the situation when, for example, the SM is processed in external, dynamically loadable module as it currently implemented for IAS/ECC card. That's for the configuration option 're-open of log file on each message' was introduced. This 're-open' logic has not been tested in the particular case of opensc-* tools used with verbose log into 'stderr' -- in dynamically loaded module the 'stderr' handle, defined in the 'main' module, was not recognized as 'stderr' and there was an attempt to close it. closes #910
Expected behaviour
What should happen?
I'm not expecting a crash
Actual behaviour
What happens instead?
The application crashed (opensc-explorer.exe, opensc-tool.exe and etc)
Steps to reproduce
I'm using Windows 10. I tried OpenSC 32-bit and 64-bit with same result.
Additional info
If I set "debug_file" in opensc.conf, it doesn't crash.
Logs
Please use Gist (https://gist.github.com/) or a similar code paster for longer
logs.
https://gist.github.com/programatix/96396074e23815971af14b7f44e7ec2d
The text was updated successfully, but these errors were encountered: