Questions tagged [seh]

Microsoft Structured Exception Handling (SEH) is the native exception handling mechanism for Windows.

Microsoft Structured Exception Handling (SEH) is the native exception handling mechanism for Windows.

177 questions
1
vote
2 answers

Forcing a coredump via Wine ignoring SEH

I'd like to force a coredump from a program (or see its memory at a specific time in some other way). There are a couple of problems though: I'm running it under wine (cannot run via winedbg, because the application detects it) The application uses…
viraptor
  • 33,322
  • 10
  • 107
  • 191
1
vote
2 answers

FS register is null

I have to implement a SEH based exception handler. To start with, I have written the following sample code, where i am trying to register an exception handler using fs register. #include #include #include using…
Barry
  • 43
  • 5
1
vote
3 answers

Handle access violation exception in vector iteration

How can I handle the exception when there is a NULL object in the list? #include #include #include #include #include using namespace std; class Test { public: string m_say; void Say()…
user1739398
  • 340
  • 2
  • 4
  • 10
1
vote
2 answers

How can I catch a memory exception?

I'm having an issue catching an exception , this is the error: Unhandled exception at 0x01034BB1 in Hello.exe: 0xC0000005: Access violation reading location 0x02343DA2. This is my code: bool VerifyAddress(HANDLE hwnd, DWORD dwAddress, char*…
John S.
  • 27
  • 6
1
vote
1 answer

Windows Structured Exception Handling: simple test program will not compile

#include int main() { int* i = (int*)malloc(sizeof(int)); *i = 5; __try { free(i); free(i); } __except { return -1; } return 0; } I am trying to learn more about windows SEH.…
Jon
  • 237
  • 3
  • 12
1
vote
0 answers

Exceptions - What really happens?

I've seen a number of articles, and questions all of which focus on the cost of exceptions, performance benchmarks, so and so. But nothing really seems to explain Why it is so slow. What really happens under-the-hood so that its magnitudes slower…
coolfool99
  • 19
  • 2
1
vote
2 answers

SEH Handlers using RtlAddFunctionTable

I've been trying to setup SEH on x64 windows using gcc by calling the RtlAddFunctionTable. Unfortunately, the API call returns success but my handler doesn't seem to ever be called. And I can't find out what's wrong. My small example…
Phyx
  • 2,697
  • 1
  • 20
  • 35
1
vote
1 answer

Vectored Exception Handling Process wide?

I know Windows seperatly builds a Structered Exception Handling Chain for each running thread within a process. I was wondering if with veh, the registered exception handler will be called process wide (no matter in what threat the exception…
Don
  • 1,428
  • 3
  • 15
  • 31
1
vote
1 answer

Structured Exception Handler catches near-zero EIP trap differently on nearly identical machines?

I have a rather complex, but extremely well-tested assembly language x86-32 application running on variety of x86-32 and x86-64 boxes. This is a runtime system for a language compiler, so it supports the execution of another compiled binary…
Ira Baxter
  • 93,541
  • 22
  • 172
  • 341
1
vote
1 answer

Reading native win32 exception data/arguments in .NET

I'm trying to receive data about a exception I throw in native (c++/win32) in a catch block of managed (.net/c#). For example, in c++, we can: void MyFunc() { const char* data = "my exception info"; ULONG_PTR args[1] { data }; …
Flavourous
  • 13
  • 5
1
vote
1 answer

How to define and use a "array of structure" in nasm-syntax asm code?

So basically I am dealing with a pseudo asm code on Win32, and I am trying to make it re-assemble. In the code, I see data structure like this: errtable errentry <1, 16h> errentry <2, 2> errentry <3, 2> …
lllllllllllll
  • 8,519
  • 9
  • 45
  • 80
1
vote
1 answer

Not always can catch SEH on WoW64 on "clean" Windows 8.1

I have Win32 MFC application compiled with VS2008. The application has TreeConrtol. There is a TVN_ITEMCHANGING handler and inside the handler I'm forcibly repainting the changed tree item. Here is the code with SEH handlers and direct WinAPI calls…
Mar
  • 941
  • 1
  • 10
  • 18
1
vote
2 answers

SEH StackOverflow exception - is it real not possible to catch?

I have read many articles about SEH exceptions in StackOverflow and CodeProject.net. After I implemented SEH exceptions handling in my C++ program, I was affected by stack overflow exception, which hadn't been caught by my software. After next part…
Viper
  • 597
  • 1
  • 8
  • 24
1
vote
1 answer

Writing SEH translator

class seh_exception : public std::exception { public: seh_exception(UINT se_code, PEXCEPTION_POINTERS se_info); seh_exception(const seh_exception& old); ~seh_exception(); const char *what() const; }; void…
Joker_vD
  • 3,715
  • 1
  • 28
  • 42
1
vote
0 answers

SEHException while using NLOpt,a c++ library, in c# via wrapper

I'm using an optimization library (NLOpt, written for c++) in c#, via this wrapper: https://github.com/roryclune/NLOptDotNet When adding more than 15 constraints to the problem I get a SEHException. Constraints are added by passing a…
rverdelli
  • 48
  • 5