bug-m4
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Assertion error when building in Debug mode with MSVC


From: Paul Eggert
Subject: Re: Assertion error when building in Debug mode with MSVC
Date: Wed, 26 Jan 2022 10:37:04 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 1/26/22 01:45, Julien Marrec wrote:
Hello Paul,

I’m not sure why you say it’s a local variable. It’s a “FILE *” isn’t it?

A FILE * is a pointer, and can be either local or global. This one's local.


[1] If you want to reproduce, and have conan installed and MSVC 2019, this
command should do it

Ships passing in the night, I'm afraid. I don't use MSVC.

I installed the attached patch into Gnulib and propagated this into m4 on Savannah so it should appear in the next m4 release. In the meantime you can build with /MD instead of /MDd. Or if you want to learn the GNU build system you can build m4 from Git.

This is actually a false alarm in /MDd, since POSIX says fclose is supposed to fail with errno == EBADF instead of crashing when the underlying file descriptor is closed. Although Microsoft doesn't claim POSIX conformance, maybe you can file a bug report with them to save other people this kind of hassle.

All the attached does is work around the /MDd bug.

Attachment: 0001-close-stream-avoid-crash-on-MSVC-Debug-mode.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]