Skip to content

PROTON-2938: WIN: Fix Heap Corruption Issue#448

Open
jamwhy wants to merge 1 commit into
apache:mainfrom
jamwhy:jamwhy/win-heap-corruption
Open

PROTON-2938: WIN: Fix Heap Corruption Issue#448
jamwhy wants to merge 1 commit into
apache:mainfrom
jamwhy:jamwhy/win-heap-corruption

Conversation

@jamwhy

@jamwhy jamwhy commented Jul 10, 2026

Copy link
Copy Markdown

Found using gflags. Tried a number of fixes, this seems to be the one that works. With this fix, I am able to use gflags to debug on windows.

 	ucrtbased.dll!00007ffb465b1691()	Unknown
>	qpid-proton-cored.dll!pn_strdup(const char * src) Line 122	C
 	qpid-proton-cored.dll!pn_error_set(pn_error_t * error, int code, const char * text) Line 77	C
 	qpid-proton-cored.dll!pn_error_copy(pn_error_t * error, pn_error_t * src) Line 119	C
 	qpid-proton-proactord.dll!pn_experimental::pni_iocp_recv(pn_experimental::iocpdesc_t * iocpd, void * buf, unsigned __int64 size, bool * would_block, pn_error_t * error) Line 1126	C++
 	qpid-proton-proactord.dll!pconnection_process(pconnection_t * pc, pn_experimental::iocp_result_t * result, bool topup) Line 2380	C++
 	qpid-proton-proactord.dll!psocket_process(psocket_t * ps, pn_experimental::iocp_result_t * result, reaper * rpr) Line 2500	C++
 	qpid-proton-proactord.dll!proactor_completion_loop(pn_proactor_t * p, bool can_block) Line 2541	C++
 	qpid-proton-proactord.dll!pn_proactor_wait(pn_proactor_t * p) Line 2566	C++
 	qpid-proton-cppd.dll!proton::container::impl::thread() Line 770	C++
 	qpid-proton-cppd.dll!proton::container::impl::run(int threads) Line 821	C++
 	qpid-proton-cppd.dll!proton::container::run() Line 92	C++
 	[downstream application frame]
	
	
	-		dest	0x00000279dc2b0fa0 <Error reading characters of string.>	char *
			<Unable to read memory>	char
-		src	0x00000279dc2b0fa0 <Error reading characters of string.>	const char *
			<Unable to read memory>	const char

@astitcher

Copy link
Copy Markdown
Member

Thanks very much for this:

This seems to be serious bug, not a trivial change that would be covered by a NO-JIRA change.

@jamwhy If you could create an JIRA issue that would help. Minimally we do need some sort of bug report with the best reproducer you can give us and a better idea of the environment this happened in (proton version at least, how the library was made etc.)

I don't know what gflags is can you give more details.

@jamwhy

jamwhy commented Jul 10, 2026

Copy link
Copy Markdown
Author

@astitcher

I have submitted the request to submit a bug.

Your Jira account request has been successfully verified, and will be reviewed by the project you indicated. Please allow up to a few days for the project to review this request. 

In the meantime what I can say is:
~ Python Proton server, mTLS
~ C++ application connected to the Python Proton server successfully, messages work etc.
~ ctrl-c on the C++ app.exe and the heap corruption with that stack above shows

I ran the application with:

gflags /p /enable app.exe /full

So full Page Heap was enabled. The stack trace in the PR description is the debugger output from that run.

@astitcher

Copy link
Copy Markdown
Member

@jamwhy you should be able to create a jira now.

@jamwhy jamwhy changed the title NO-JIRA: WIN: Fix Heap Corruption Issue PROTON-2938: WIN: Fix Heap Corruption Issue Jul 15, 2026
@jamwhy

jamwhy commented Jul 15, 2026

Copy link
Copy Markdown
Author

@astitcher https://issues.apache.org/jira/browse/PROTON-2938
Let me know if I need to add anything more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants