Ticket UUID: | 8ca2aae39172f90c314256deda71e006cb2f38bf | ||
Title: | Command-line wildcards broken with Fossil 1.24 on Windows, in some cases crashing Fossil (1.23 was OK) | ||
Status: | Fixed | Type: | Code_Defect |
Severity: | Important | Priority: | |
Subsystem: | Resolution: | Fixed | |
Last Modified: | 2012-11-30 16:39:29 | ||
Version Found In: | 1.24 | ||
Description & Comments: | |||
There appears to be a regression introduced with Fossil 1.24 on Windows regarding command-line wildcard parsing.
Fossil 1.23 behaves as expected: > fossil-123 md5sum common\* 2a9d384b95db916a22cc05b7227ab55b common\fileutils.cpp eb7ae4d4d206c73079faa4bfb4d737ca common\fileutils.h However, under 1.24: > fossil md5sum common\* Assertion failed: (p)->xRealloc==blobReallocMalloc || (p)->xRealloc==blobReallocStatic, file ./src/blob.c, line 273 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Wildcards also fail, but less spectacularly, with other Fossil commands: Fossil 1.24: >fossil add gui\forms.* fossil: not found: C:/Projects/InkSpector2/src/gui/forms.* Fossil 1.23: >fossil-123 add gui\forms.* ADDED src/gui/forms.cpp ADDED src/gui/forms.h Thanks Mark. drh added on 2012-11-02 21:46:52 UTC: jan.nijtmans added on 2012-11-03 11:21:18 UTC: Unfortunately, mingw doesn't have an unicode-aware crt0, that would solve everything. Mingw-w64 and msvc have it, but those don't do command line expansion. I would recommend to build command line expansion into fossil. It would make command line expansion available to mingw-w64 and msvc builds on the Windows console as well. The risk is that when using Msys or Cygwin, the command line expansion is done twice, I don't know exactly what possible problems that could give. So, the easiest workaround would be: use the Msys or Cygwin or any other shell, just not the Windows console. drh added on 2012-11-03 12:47:01 UTC: Unix, Msys, and cygwin shells would continue to operate normally. Users on a windows shell, however, would need to add the "glob" keyword if they want globing to occur in their command. anonymous added on 2012-11-03 14:30:05 UTC: I'm not sure if it's been mentioned before, but msvc does support expanding command-line wildcards into separate argv strings: http://msdn.microsoft.com/en-us/library/8bch7bkk%28v=vs.80%29.aspx Mark. jan.nijtmans added on 2012-11-04 21:04:47 UTC: However, under 1.24: > fossil md5sum common\* Assertion failed: (p)->xRealloc==blobReallocMalloc || (p)->xRealloc==blobReallocStatic, file ./src/blob.c, line 273Shouldn't fossil be compiled without assertions, so with -DNDEBUG? That should fix the mentioned crash. drh added on 2012-11-04 21:36:42 UTC: I think we want to continue to run with assert()s enabled. This gives better visibility to mistaken assumptions in the code. |