Hello Experts,
We have a strange problem with the RtlUpperChar function. Sometimes it causes system restart on some computers when we try to convert non alphabetic character. But there are other computers which work fine with the same code. Any suggestion? Thank you in advance!
Are you doing this on DISPATCH_LEVEL?
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntdev…
> Hello Experts,
> We have a strange problem with the RtlUpperChar function. Sometimes it causes
system restart on some computers when we try to convert non alphabetic
character. But there are other computers which work fine with the same code.
Any suggestion? Thank you in advance!
>
>
Yes we call it on DISPATCH_LEVEL, but it is higher than specified on MSDN (APC_LEVEL). Is it the problem? But why not cause error on other computers? Any idea?
xxxxx@freemail.hu wrote:
Yes we call it on DISPATCH_LEVEL, but it is higher than specified on MSDN (APC_LEVEL). Is it the problem? But why not cause error on other computers? Any idea?
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminarsTo unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Yes it is a problem. And in your case, when you call this function at an
elevated IRQL and the system takes a dive, and this is the function
indicated as the problem, and the docs tell you not to, why do you even
question if you need to fix it?
Kernel code is special, if you don’t follow the docs precisely with a
few exceptions, your going to kill the system.
Why not the other systems? Good chance they were not at an elevated IRQL
when they hit your code. When you violate the rules, it doesn’t always
mean there will be a 100% chance of a crash ensuing; just means there is
a ‘good’ chance usually. For example, you can access memory declared as
pagable
at dispatch level, however, if it has been paged out your going to crash
- otherwise you’ll be fine… It’s a roll of the dice, sometimes you’ll roll
snake eyes…
Matt
OK! It is clear for me. I just wondered why not cause system restart on every computer. Is there any way to switch to another IRQL (because when we try it caused blue death), or any other way to get uppercased characters?
xxxxx@freemail.hu wrote:
OK! It is clear for me. I just wondered why not cause system restart on every computer. Is there any way to switch to another IRQL (because when we try it caused blue death), or any other way to get uppercased characters?
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminarsTo unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
You shouldn’t ever adjust the IRQL yourself, you should look more at
your design. By the way, what type of driver is this and why are you
converting bytes to upper case? Are you working in file system land?
Matt
No it’s an NDIS intermediate driver, and we should compare strings in case insensitive way.
are these strictly ascii strings and not WCHAR unicode strings? If so there
are well known methods for string comparison that can easily be implemented.
NDIS and string processing are not a good mix.
On Fri, Feb 22, 2008 at 9:32 AM, wrote:
> No it’s an NDIS intermediate driver, and we should compare strings in case
> insensitive way.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Mark Roddy
No ways, just plain remove the code path which does the uppercase from the
path executing at DISPATCH_LEVEL.
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntdev…
> OK! It is clear for me. I just wondered why not cause system restart on every
computer. Is there any way to switch to another IRQL (because when we try it
caused blue death), or any other way to get uppercased characters?
>
>
If you’re hell bent on this requirement, you could make your own static,
non-paged translation tables, and do it yourself, but I personally can
not think of any reason why one should be doing this at DISPATCH_IRQL.
How important can it be to have something be uppercase in a driver really?
Good luck,
mm
xxxxx@freemail.hu wrote:
OK! It is clear for me. I just wondered why not cause system restart on every computer. Is there any way to switch to another IRQL (because when we try it caused blue death), or any other way to get uppercased characters?