From: Hans-Bernhard B. <HBB...@t-...> - 2022-05-07 19:32:30
|
Am 01.05.2022 um 13:38 schrieb Dominique Pellé: > Hi > > cscope-15.9 (installed from homebrew) crashes on macOS (Monterey). That's somewhat surprising insofar as it's the first such report in 4 years since we released 15.9, except for a build failure that was apparently due to some breakage in Apple's latest version of their development tool chain. > ==50182==ERROR: AddressSanitizer: global-buffer-overflow on address > 0x00010474cc81 at pc 0x00010d195718 bp 0x00030d14ae90 sp [...]> 0x00010474cc81 is located 0 bytes to the right of global variable > 'found_caller' defined in 'find.c:1047:14' (0x10474cc80) of size 1 [...] > I can reproduce the crash at least with vim sources: Which version of the vim source, in particular? > The proposed patch fixes that issue in `find.c` by making sure > the returned `char*` is '\0' terminated. The patch would be much easier to digest if it did just that, instead of conflating it with other, unrelated changes. Changes for 3 separate issues really should come as 3 patch files. That said, it might be even better if you could use the "Patches" tracker at SourceForge for them. > However, cscope still did not work on macOS for another > reason whereas it worked on Linux. "Did not work" begs for a better explanation. I do see test failures here in vim's "make test_cscope" of the GIT head version. But those look like they're more likely to have been caused by bit-rot in the tests' expected results. The results themselves appear correct. > Debugging the difference, > I saw that BUFSIZ is 1024 on macOS and 8192 on Linux and > somehow this causes cscope to not work on macOS. That is an extremely surprising finding, given that cscope reportedly has worked on MacOS just fine, for a very long time. Also, other platforms that use a BUFSIZ of 1024 have worked just fine, too. Including Cygwin, which is my primary cscope platform these days. That make me doubt this analysis heavily. > I wanted to try with the latest code in CVS but > I was not able to download it from sourceforge. CVS has been discontinued by SourceForge. The source is now in git there. |