Open planetis-m opened 3 months ago
@juancarlospaco Can you also use the flags? -t:"-fsanitize=address" -l:"-fsanitize=address" -d:nosignalhandler
378.27 Kb (387,352 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T20:12:11
2024-08-24T20:12:12
1 mins
374.62 Kb (383,608 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T20:12:15
2024-08-24T20:12:17
1 mins
374.62 Kb (383,608 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T20:12:17
2024-08-24T20:12:18
1 mins
330.17 Kb (338,096 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T20:12:20
2024-08-24T20:12:22
1 mins
333.49 Kb (341,496 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T20:12:24
2024-08-24T20:12:25
1 mins
333.49 Kb (341,496 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T20:12:27
2024-08-24T20:12:27
333.49 Kb (341,496 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T20:12:29
2024-08-24T20:12:29
333.49 Kb (341,496 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T20:12:31
2024-08-24T20:12:31
2020-10-28 13:00:49 +0000
on commit #a4f9bc55c with message:
```
ARC now capable of custom extra alignment. Ref, closure and seq support. (#15697)
(cherry picked from commit 0956a9953780b0952acb56806fdffa8054fe1070)
```
The bug is in the files:
```
compiler/ccgexprs.nim
compiler/liftdestructors.nim
lib/core/typeinfo.nim
lib/system/arc.nim
lib/system/bitmasks.nim
lib/system/deepcopy.nim
lib/system/memalloc.nim
lib/system/orc.nim
lib/system/seqs_v2.nim
tests/arc/thard_alignment.nim
tests/collections/thardalignmentconstraint.nim
```
The bug can be in the commits:
(Diagnostics sometimes off-by-one).11.4.0
14.0.0
20.4
2024-08-24T20:11:33Z
1
nim c --gc:arc -d:useMalloc -d:nimArcDebug -d:nimArcIds -d:nimAllocPagesViaMalloc -d:useSysAssert -d:useGcAssert -d:nimLeakDetector --debugger:native --debuginfo:on -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim && valgrind /home/runner/work/Nim/Nim/temp
:robot: Bug found in 20 mins
bisecting 327
commits at 16
commits per second
!nim c --gc:arc -d:useMalloc -d:nosignalhandler --passC:-fsanitize=address --passL:-fsanitize=address
import std/sequtils
proc foo(x: string) =
echo x & "abc"
foo(cast[string](repeat('a', 6)))
477.45 Kb (488,904 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T21:11:38
2024-08-24T21:11:41
2 mins
469.45 Kb (480,712 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T21:11:44
2024-08-24T21:11:46
1 mins
469.45 Kb (480,712 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T21:11:46
2024-08-24T21:11:48
1 mins
429.55 Kb (439,856 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T21:11:51
2024-08-24T21:11:52
1 mins
435.48 Kb (445,928 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T21:11:55
2024-08-24T21:11:56
1 mins
435.48 Kb (445,928 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T21:11:59
2024-08-24T21:11:59
435.48 Kb (445,928 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T21:12:02
2024-08-24T21:12:02
435.48 Kb (445,928 bytes)
```cpp
#include "nimbase.h"
#include 2024-08-24T21:12:04
2024-08-24T21:12:04
11.4.0
14.0.0
20.4
2024-08-24T21:11:00Z
3
nim c --gc:arc -d:useMalloc -d:nosignalhandler --passC:-fsanitize=address --passL:-fsanitize=address -d:nimArcDebug -d:nimArcIds -d:nimAllocPagesViaMalloc -d:useSysAssert -d:useGcAssert -d:nimLeakDetector --debugger:native --debuginfo:on -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim && valgrind /home/runner/work/Nim/Nim/temp
:robot: Bug found in 40 mins
bisecting 8
commits at 0
commits per second
Interesting this means casting from seq
to string
never was supported. :-)
Description
The error log points to this code:
Nim Version
Nim Compiler Version 2.1.9 [Linux: amd64] Compiled at 2024-08-24 Copyright (c) 2006-2024 by Andreas Rumpf
git hash: 7c59987dbd90ae397cd105e37d9b0661696ef669 active boot switches: -d:release
Current Output
Expected Output
No response
Possible Solution
I wouldn't put blame on https://github.com/nim-lang/Nim/pull/24004 as the same bug was possible before but it happened on the
=dup(cast[string](x))
call.Additional Information
nimPNG is affected as it uses string internally.