Buffer overrun on windows

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Buffer overrun on windows

Anders D Nygaard
Hi,

I'm currently brushing a bit up on my 30+ years old Prolog-fu on a puzzle,
using GNU-Prolog 1.4.4, dated Apr 23 2013 on Windows 10

In the process, I seem to be running into a buffer overrun in ntdll.dll
with the message
"cookie instrumentation code detected a stack-based buffer overrun"
after a *lot* of backtracking producing multiple solutions for the puzzle;
it takes several minutes of processing.

I cannot be sure, but it seems to be related to unwinding after the last solution,
and seems to be fully reproducible.

I've looked at the user and bug mailing lists, but there seems to be little
activity the past couple of years, and in any case, my repro scenario
is probably very far from minimal, so it seems unreasonable to inflict
my 400+ lines program on the bug list just yet.

Any advice? Is it a known issue? Is GNU-Prolog supposed to support
Windows 10? Ideas for trimming code to a minimum for a proper bug report?
Will anyone be there to look at it if I do?

Best,
Anders D. Nygaard.

_______________________________________________
Users-prolog mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/users-prolog
Reply | Threaded
Open this post in threaded view
|

Re: Buffer overrun on windows

"Micha� Bieli�ski"
Dnia 10 Września 2017, 23:37, N, Anders D Nygaard napisał:
> In the process, I seem to be running into a buffer overrun in
> ntdll.dll with the message "cookie instrumentation code detected
> a stack-based buffer overrun" after a *lot* of backtracking
> producing multiple solutions for the puzzle; it takes several
> minutes of processing.

Never heard of that problem. That said my uses for Prolog rarely demand
very deep stack nesting.

> I've looked at the user and bug mailing lists, but there seems
> to be little activity the past couple of years, and in any case,
> my repro scenario is probably very far from minimal, so it seems
> unreasonable to inflict my 400+ lines program on the bug list
> just yet.

Indeed, there is little activity but some observers are present. If you
can post the program somewhere and drop a link here I will attempt to
reproduce it on Arch Linux with varying settings of stack size limit.

> Is GNU-Prolog supposed to support Windows 10?

x86_64 / Win64 is on supported platforms list.

> Ideas for trimming code to a minimum for a proper bug report?

Nothing specific without at least a general knowledge of what the solution
is supposed to accomplish. Usual debugging techniques like removing
non-essential code paths may be useful. You might try to reproduce the
behavior by writing something specifically targeted to go very deep on the
stack and see if it blows up.

> Will anyone be there to look at it if I do?

Several people are regulars over the years. Sometimes (often?) people
asking a question receive a direct reply instead of email back to the
whole list and this contributes to impression of this place being
deserted.

Anyway, I am interested and one person might just be enough. However, if
it will turn to be Windows specific I will be unable to help much.

--
Michał


_______________________________________________
Users-prolog mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/users-prolog