Windows error 0x0000002E, 46

Detailed Error Information

DATA_BUS_ERROR[1]

This is a Blue Screen of Death stop code. More information is available in the Knowledge Base article Bug Check 0x2E: DATA_BUS_ERROR.

HRESULT analysis[2]

This is probably not the correct interpretation of this error. The Win32 error above is more likely to indicate the actual problem.
FlagsSeveritySuccess

This code indicates success, rather than an error. This may not be the correct interpretation of this code, or possibly the program is handling errors incorrectly.

Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode0 (0x000)
NameFACILITY_NULL[2][3]
DescriptionThe default facility code.[2][3]
Error Code46 (0x002e)

Possible solutions

6

Investigating Memory Leak

windows
debugging
memory-management
memory-leaks
windbg

The stack recorded when using GFlags is done without utilizing .pdb and often not correct. Since you have traced the leak down to a specific size on a given heap, you can try to set a live break in RtlAllocateHeap and inspect the stack in windbg with proper symbols. I have used the following with some success. You must edit it to suit your heap and size.

 $$ Display stack if heap handle eq 0x00310000 and size is  0x1303
 $$ ====================================================================
bp ntdll!RtlAllocateHeap "j ((poi(@esp+4) = 0x00310000) & (poi(@esp+c) = 0x1303) )'k';'gc'" 

Maybe you then get another stack and other ideas for the offender.

answered on Stack Overflow Apr 10, 2012 by Kjell Gunnar • edited May 9, 2015 by Kjell Gunnar
5

SBS 2011 "All GC's are down" after migration

windows-sbs-2011

Today is just not my day. If I had read my dcdiag closely:

NETLOGON Service is paused on [EPPINGSBS2011]

Un-paused the service, and hey presto, everybody is happy. Now - to find out why it was paused in the first place.

answered on Server Fault Nov 21, 2011 by Mark Henderson • edited Apr 13, 2017 by Community
3

Embedded C compile size is bigger with int16's than with int32's. Why?

c
build
firmware

Your compiler probably emits code for int32's just fine; it's probably the natural int size for your architectiure (is this true? Is sizeof(int)==4?). I am guessing that the size increase is from three places:

  1. Making alignment work

    32-bit ints probably align naturally on the stack and other places, so typically code would not have to be emitted to make sure "the stack is 4 byte aligned". If you sprinkle a bunch of 16 bit ints in your code, it may have to add padding (extra adds to frame pointer as a fix-up?) Usually one add instruction covers the frame/stack maintenance, but maybe extra instructions are emitted to guarantee alignment.

  2. Translating between 16-bit and 32-bit ints

    With 32-bit ints, most instructions naturally work. With smaller ints, sometimes the compiler has to emit code that chops/slices up bits so that it preserves the semantics of the smaller. (Maybe doing an extra AND instruction to mask off some high-order bits or an OR instruction to set some bits).

  3. Going back and forth to memory

    Standard LOADS and STORES are for 32-bit ints (which is probably natural size of your machine). It's possible, that when it has to store only 2 bytes instead of 4, that the architecture has to emit extra instructions to store a non-standard int (either by chopping up the int, using a strange instruction that has a longer encoding, or using bit instructions to chop up the instruction).

These are all guesses. The best way to see is to look at the assembly code and see what's going on!

answered on Stack Overflow Jun 23, 2015 by rts1
2

Investigating Memory Leak

windows
debugging
memory-management
memory-leaks
windbg

The first thing is that the new operator is the new [] operator so is there a corresponding delete[] call and not a plain old delete call?

If you suspect this code I would put a test harness around it, for instance put it in a loop and execute it 100 or 1000 times, does it still leak and proportionally.

You can also measure the memory increase using process explorer or programmatically using GetProcessInformation.

The other obvious thing is to see what happens when you comment out this function call, does the memory leak go away? You may need to do a binary chop if possible of the code to reduce the likely suspect code by half (roughly) each time by commenting out code, however, changing the behaviour of the code may cause more problems or dependant code path issues which can cause memory leaks or strange behaviour.

EDIT Ignore the following seeing as you are working in a managed environment.

You may also consider using the STL or better yet boost reference counted pointers like shared_ptr or scoped_array for array structures to manage the lifetime of the objects.

answered on Stack Overflow Apr 5, 2012 by EdChum • edited Apr 6, 2012 by EdChum
1

GDB reports "No line 92 in the current file." but I actually have line 92

c
debugging
operating-system
gdb
memory-size

Compile without optimizations. Use O0 gcc flag for that.

answered on Stack Overflow Apr 6, 2015 by user3639612
0

Windows phone: using periodic agent

c#
windows-phone
background-agents
periodic-task

You must put your periodic agent code in App.xaml.cs inside method on Application_Closing

answered on Stack Overflow Aug 17, 2014 by Raditya Kurnianto
0

Embedded C compile size is bigger with int16's than with int32's. Why?

c
build
firmware

To save space I tried replacing the relevant variables with int16's. When I built it, the size of the build went up by about 60 bytes.

This doesn't make much sense to me. Using a smaller data type doesn't necessary translate to fewer instructions. It could reduce memory use when running the software but not necessarily build size.

So, for example, the reason using smaller data types here could be increasing the size of your binaries could be due to the fact that using smaller types requires more instructions or longer instructions. For example, for non-word/dword aligned memory, the compiler may have to use more instructions for unaligned moves. It may have to use special instructions to extract lower/upper words if all the general-purpose registers are larger. In that case, you might also get a slight performance hit in addition to the increased binary size using those smaller types (but less memory use when the code is running).

There may be a number of scenarios and it's specific to both the exact compiler you are using and architecture (the assembly code will reveal the exact cause), but in short, using smaller types for variables does not necessarily mean smaller-sized builds/fewer instructions, and could easily mean the opposite.

answered on Stack Overflow Jun 23, 2015 by Team Upvote • edited Jun 23, 2015 by Team Upvote
0

Linux syscall in vmlinux and virtual memory

linux
memory
linux-kernel
reverse-engineering
system-calls

The useless ret is a stub that is replaced by the right code once the memory has been mapped. The code of system calls maybe located to different places depending on some non-deterministic choices and once the memory address is known, the stub is replaced.

answered on Stack Overflow May 19, 2014 by Thomas Coudray

Comments

Leave a comment

(plain text only)

Sources

  1. https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-code-reference2
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx
  3. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0