Commit Graph

17194 Commits

Author SHA1 Message Date
narimiran
a683ca3fac bigints are not supposed to work on 1.2.x 2021-12-07 19:15:47 +01:00
narimiran
f7ea7b3c4f disable nimpy 2021-12-07 18:09:57 +01:00
Andreas Rumpf
a34845b66c fixes #11225; generic sandwich problems; [backport:1.2] (#17255)
* fixes #11225; generic sandwich problems; [backport:1.2]
* progress
* delegating these symbols must be done via 'bind'

(cherry picked from commit 2f213db7ee)
2021-12-07 16:34:58 +01:00
Andreas Rumpf
79f95a2efc misc bugfixes [backport:1.2] (#19203)
(cherry picked from commit 23c117a950)
2021-12-06 12:53:37 +01:00
Andreas Rumpf
8a3f542532 fixes #14470 [backport:1.2] (#19115)
(cherry picked from commit 15157d06c3)
2021-12-06 12:51:56 +01:00
Andreas Rumpf
2009df72cb fixes a 'mixin' statement handling regression [backport:1.2] (#18968)
(cherry picked from commit 8eef557157)
2021-12-06 12:51:32 +01:00
narimiran
f4216f12b3 bump NimVersion to 1.2.15 2021-12-06 12:50:03 +01:00
narimiran
d327eaacbf bump NimVersion to 1.2.14 v1.2.14 2021-11-07 09:51:32 +01:00
Etan Kissling
735e3eea78 allow converting static vars to openArray (#19049)
When assigning constant output to a seq, and then passing that static
seq to other functions that take `openArray`, the compiler may end up
producing errors, as it does not know how to convert `static[seq[T]]`
to `openArray[T]`. By ignoring the `static` wrapper on the type for
the purpose of determining data memory location and length, this gets
resolved cleanly. Unfortunately, it is relatively tricky to come up
with a minimal example, as there are followup problems from the failing
conversion, e.g., this may lead to `internal error: inconsistent
environment type`, instead of the relevant `openArrayLoc` error message.

(cherry picked from commit 490c4226a5)
2021-10-27 11:04:39 +02:00
flywind
d8cc349ac6 [tools] use the right parameter [backport:1.0] (#18957)
(cherry picked from commit b2873f0f63)
2021-10-06 13:41:27 +02:00
narimiran
e05daba73e try to fix the flaky test, similarly to the devel version 2021-08-25 08:22:51 +02:00
narimiran
2a72eeafdf it is IndexError, not IndexDefect, in 1.2 2021-08-24 15:05:17 +02:00
narimiran
2d06867388 disable testing packages which depend on newer Nim versions 2021-08-24 11:32:45 +02:00
narimiran
9b47614ba1 we can't use collect like that in 1.2 2021-08-24 11:32:28 +02:00
flywind
8d5065453f fix #18702(fix parseutils.parseFloat) (#18703) [backport:1.0]
* fix #18702
* Apply suggestions from code review

(cherry picked from commit 901c5ded52)
2021-08-24 07:20:47 +02:00
Andreas Rumpf
1802f94868 fixes #18643 [backport:1.0] (#18678)
(cherry picked from commit 018465a234)
2021-08-24 07:18:08 +02:00
Timothee Cour
5a42d393a4 link stable and devel docs in nim docs (#18272) [backport:1.2]
(cherry picked from commit d3b27eb63e)
2021-08-24 07:14:17 +02:00
Ștefan Talpalaru
76560576d2 asyncdispatch+stackTraceOverride: fix premature collection (#18039) [backport:1.2]
Copying StackTraceEntry instances when nimStackTraceOverride is defined
breaks the link between a cstring field that's supposed to point at
another string field in the same object.

Sometimes, the original object is garbage collected, that memory region
reused for storing other strings, so when the StackTraceEntry copy tries
to use its cstring pointer to construct a traceback message, it accesses
unrelated strings.

This only happens for async tracebacks and this patch prevents that by
making sure we only use the string fields when nimStackTraceOverride is
defined.

Async tracebacks also beautified slightly by getting rid of an extra line
that was supposed to be commented out, along with the corresponding debugging output.

There's also a micro-optimisation to avoid concatenating two strings just
to get their combined length.

(cherry picked from commit a1c82c39af)
2021-05-19 19:52:50 +02:00
narimiran
2684b04ab1 disable 'nimquery' package 2021-05-17 22:27:10 +02:00
Timothee Cour
6dde797752 fix #13166 tioselectors flaky test on freebsd+OSX (#14634)
(cherry picked from commit d149823019)
2021-05-17 22:26:45 +02:00
Andreas Rumpf
74f34c81e8 feature: the compiler can warn when you use the implicit 'result' variable (#17988) [backport:1.2]
* implements #17855

(cherry picked from commit 378ee7f888)
2021-05-17 19:04:34 +02:00
Andreas Rumpf
34563f86c2 fixes #15848 [backport:1.2] (#17959)
(cherry picked from commit 51f3ef6cb8)
2021-05-17 16:13:10 +02:00
shirleyquirk
7a9e5ba68f Fix buffer-overrun bug in net (#17728) [backport:1.0]
(cherry picked from commit fdd4391534)
2021-05-17 16:10:33 +02:00
narimiran
d2af421089 use csources_v1 in build_all scripts 2021-04-30 10:56:42 +02:00
Andreas Rumpf
ba02bf50b9 CIs: attempt to use csources_v1 (#16282)
* CIs: attempt to use csources_v1
* also updated the BSDs
* also updated azure pipelines
* std modules should not itself use the 'std/' import dir...
* compiler has to be careful with std/ for v1 booting

(cherry picked from commit a9b62de895)
2021-04-28 08:50:39 +02:00
narimiran
424a00db2b bump NimVersion to 1.2.13 2021-04-28 08:40:02 +02:00
zah
fb03c4b937 Remove the use of usrToCell in gcMark [backport:1.2] (#17709)
* Remove the use of usrToCell in gcMark [backport:1.2]

Recently, we've discovered a GC crash resulting from inlining of
the memory allocation procs that allowed the compiler to avoid
maintaining any references to the "user pointer" on the stack.
Instead, a "cell pointer" appeared there and all field accesses
were performed with adjusted offsets. This interfered with the
ability of the GC to mark the correct cell in the conservative
stack scans which lead to premature collection of objects.

More details here:
af69b3ceae

This commit closes another theoretical loophole that may lead to
the same problem. If a short proc is accessing both the object and
its reference count in a short sequence of instructions, the compiler
may be enticed to reduce the number of registers being used by storing
only a single pointer to the object and using offsets when reading
and writing fields. A perfectly good strategy would be to store only
the cell pointer, so the reference count updates can be performed
without applying offsets. Accessing the fields of the object requires
offsets anyway, but these can be adjusted at compile-time without any
loss. Following this strategy will lead to the same problem of marking
a wrong cell during the conservative stack scan, leading to premature
collection.

The problem is avoided by not using `usrToCell` in `gcMark`. Since
the cell discovery logic can already handle interior pointers, the
user pointers don't need to be adjusted for the GC to function correctly.

(cherry picked from commit 3b47a689cf)
v1.2.12
2021-04-14 12:10:39 +02:00
narimiran
ba8f657635 bump NimVersion to 1.2.12 2021-04-13 21:52:25 +02:00
narimiran
6238f2ee1e Revert "fixes #11225; generic sandwich problems; [backport:1.2] (#17255)"
This reverts commit d85b7dde7b.
2021-04-13 09:59:53 +02:00
narimiran
7aff6ded84 [ci skip] minor: fix indentation in manual.rst
(cherry picked from commit d3529d0d5a)
2021-03-31 13:42:48 +02:00
Miran
fe8b84496f [backport:1.2] Avoid inlining of newObj and newObjRC1 calls (#17582)
This is taken from:
af69b3ceae

Full original comment:

This is to avoid heavy inlining happening when two allocation calls
would occur shortly after each other.

This inlining would sometimes be accompanied with an optimisation
as the compiler is able to see that cellToUsr ending the first
allocation call is shortly followed by an usrToCell call. The
pointer arithmetic is redundant and the compiler can eliminate it,
leaving only the cell address in a register (and later the stack)
instead of the actual pointer to the user data, as one would expect.

This combined with a GC collect cycle will cause the stack scan to
only notice the cell address, which is of no good due to a usrToCell
in the gcMark call which shifts that address to an adjacent cell.
This means that the actual cell of importance will not get marked
and thus cause a premature collection of that cell. BOOM.

(cherry picked from commit 40093b4a93)
2021-03-30 11:47:39 +02:00
Danil Yarantsev
7f834c69fb Free the certificate after checking in checkCertName (#17558) [backport:1.2]
* Fix small leak in checkCertName
* Size is not needed either
* Free the certificate after checking

(cherry picked from commit b36182b0a4)
2021-03-29 15:34:11 +02:00
Timothee Cour
9a58bddc55 fix #17454 (#17461)
(cherry picked from commit d78ebe4a0e)
2021-03-29 15:34:03 +02:00
narimiran
9ebf537341 bump NimVersion to 1.2.11 2021-03-26 09:02:54 +01:00
narimiran
5ea5d82507 Revert "fixes #15210 [backport:1.2] (#15237)"
This reverts commit ae688aa7f5.
2021-03-22 11:52:22 +01:00
Andreas Rumpf
d85b7dde7b fixes #11225; generic sandwich problems; [backport:1.2] (#17255)
* fixes #11225; generic sandwich problems; [backport:1.2]
* progress
* delegating these symbols must be done via 'bind'

(cherry picked from commit 2f213db7ee)
2021-03-20 08:44:04 +01:00
Igor Ribeiro de Assis
1d301e354f Fix FutureStream memory usage (#17395) [backport:1.2]
(cherry picked from commit 9bb0e55749)
2021-03-18 17:46:59 +01:00
xioren
a7570ff0c2 Relocate 4xx/5xx exception in downloadFile (#17332) [backport:1.2]
Move 4xx/5xx exception to before disk i/o. As it stands an empty file is created on http error 4xx/5xx.

(cherry picked from commit 3d198fdcc2)
2021-03-18 17:30:15 +01:00
alaviss
86c8977726 compiler/installer.ini: package cacert.pem on Windows [backport:1.2] (#17172)
Follow up of 5dc544e1f5

After updating windeps.zip, it appears that Windows' build was
unchanged. As it turns out, cacert.pem is not set for packaging by the
compiler package manifest.

This commit add cacert.pem to the Windows package.

(cherry picked from commit d35f366d6f)
2021-03-18 17:25:41 +01:00
Andreas Rumpf
2ee078cdf8 fixes yet another SSL problem on Windows [backport:1.2] (#17167)
(cherry picked from commit b48a32053f)
2021-03-18 17:24:37 +01:00
narimiran
ebc114c526 Revert "fix #17118 (#17119) [backport:1.2]"
This reverts commit 2e896e3360.
v1.2.10
2021-02-22 13:51:01 +01:00
narimiran
6da0bf80c3 bump NimVersion to 1.2.10 2021-02-22 10:31:38 +01:00
flywind
2e896e3360 fix #17118 (#17119) [backport:1.2]
* fix js unsigned integer
* Use `std` prefix for standard library modules
* fix #17118

(cherry picked from commit 32bf10126c)
2021-02-22 10:31:14 +01:00
Miran
d922751d98 [backport:1.2] update nimble commit hash (#17109)
(cherry picked from commit da52e81327)
2021-02-19 20:38:09 +01:00
Andreas Rumpf
ca1f97951c fixes #17085 [backport:1.2] (#17101)
(cherry picked from commit 4395a26764)
2021-02-19 20:36:13 +01:00
Benoit Favre
a48abc262c Fix bug in removeDotSegments when path ends with dot (#17038) [backport:1.2]
(cherry picked from commit 8f54d3b792)
2021-02-17 18:39:34 +01:00
narimiran
c18726f4a1 correctly backport pragmas changes 2021-02-09 20:23:13 +01:00
Miran
965b37ab4a [backport:1.2] update the nimble commit hash to the latest one (#16971)
(cherry picked from commit 0d34345f29)
2021-02-09 19:09:37 +01:00
narimiran
7deedd3601 remove 'tsugar' 2021-02-09 17:33:38 +01:00
Andreas Rumpf
2db37e2e0e final SSL changes [backport:1.2] (#16983)
(cherry picked from commit 74d6a4d7f4)
2021-02-09 15:45:05 +01:00