Commit Graph

19877 Commits

Author SHA1 Message Date
Miran
c17baaefbc [backport:1.0] json: limit recursion depth (#19252)
* json: limit recursion depth

* do not run this check for JS backend
2021-12-14 18:16:49 +01:00
PMunch
3e31f55aed Fix #19253 (#19254)
This fixes 19253 by marking the bodyStream as completed when no content
was sent.
2021-12-14 13:28:42 +00:00
Nick Wilburn
c55930f2e6 fix: fixes bug in CVerifyPeerUseEnvVars (#19247)
Previously CVerifyPeerUseEnvVars was not being passed into
scanSslCertificates, which meant that we weren't scanning
additional certificate locations given via the SSL_CERT_FILE and
SSL_CERT_DIR environment variables
2021-12-14 12:22:10 +00:00
Nan Xiao
78b86b7942 basicopt.txt: Unify the format (#19251) 2021-12-14 09:54:01 +01:00
Carlo Capocasa
0ff4b2ba7e fix bug #14468 zero-width split (#19248) 2021-12-13 07:29:22 +01:00
Jaremy Creechley
4b5cecd902 Various std net improvements (#19132)
* Variant of  that works with raw IpAddresses.

- Add doc tests for new net proc's.
- Aadd recvFrom impl
- Add recvFrom impl -- tweak handling data var

- Update lib/pure/net.nim
	Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>

- cleaning up sendTo args
- remove extra connect test
- cleaning up sendTo args
- fix inet_ntop test
- fix test failing - byte len

* fix test failing - byte len

* debugging odd windows build failure

* debugging odd windows build failure

* more experiments to figure out the windows failure

* try manual assigment on InAddr

Co-authored-by: Jaremy Creechley <jaremy.creechley@panthalassa.com>
2021-12-12 21:39:56 +00:00
Dominik Picheta
a3ef5df680 Update uri.nim (#19148) [backport:1.0] 2021-12-11 09:24:23 +01:00
Ștefan Talpalaru
1a92edeb89 nimc.rst: fix table markup (#19239) 2021-12-11 05:15:44 +01:00
Andreas Rumpf
908fc2a22e let Nim support Nimble 0.14 with lock-file support [backport:1.6] (#19236) 2021-12-10 17:13:48 +01:00
Andreas Rumpf
7ff43d07b2 added --nimMainPrefix switch; fixes #15955; refs #16945 [backport:1.6] (#19235) 2021-12-10 14:28:59 +01:00
Andreas Rumpf
9338aa2497 fixes a possible 'javascript:' protocol exploit [backport:1.0] (#19134)
* fixes a possible 'javascript:' protocol exploit [backport:1.0]

* add tests

* Update tests/stdlib/trstgen.nim

* add the same logic for hyperlinks

* move the logic into a proc

Co-authored-by: narimiran <narimiran@disroot.org>
2021-12-10 09:24:20 +01:00
MichalMarsalek
c989542339 move toDeque to after addLast (#19233) [backport:1.0]
Changes the order of procs definitions in order to avoid calling an undefined proc.
2021-12-10 07:39:12 +01:00
Jaremy Creechley
d39147219a Revert "swap port to correct port order (#19177)" (#19234)
This reverts commit 0d0c249074.
2021-12-10 07:38:39 +01:00
Ștefan Talpalaru
69aabdab80 nimRawSetjmp: support Windows (#19197)
* nimRawSetjmp: support Windows

Using `_setjmp()` directly is required to avoid some rare (but very
annoying) exception-related stack corruption leading to segfaults on
Windows, with Mingw-w64 and SEH.
More details: https://github.com/status-im/nimbus-eth2/issues/3121

Also add "nimBuiltinSetjmp" - mostly for benchmarking.

* fix for Apple's Clang++
2021-12-10 06:31:29 +01:00
Andreas Rumpf
32d4bf3525 fixes an old ARC bug: the produced copy/sink operations don't copy the hidden type field for objects with enabled inheritance; fixes #19205 [backport:1.6] (#19232) 2021-12-09 22:23:16 +01:00
flywind
4f64c9fae5 add comments to spawn and pinnedSpawn (#19230)
`spawn` uses `nimSpawn3` internally and `pinnedSpawn` uses `nimSpawn4` internally. I comment it in order to help contributors get the gist of its functionality.
2021-12-09 18:49:31 +01:00
flywind
99f8793502 remove std/sharedstrings (#19228)
* remove std/sharedstrings

it has been broken since 0.18.0

* rephrase the changelog entry
2021-12-09 22:37:59 +08:00
wenghongquan
742e9d65ad Add support for LoongArch (#19223)
* Add support for LoongArch

* Update compiler/installer.ini

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-12-09 14:00:33 +01:00
Andreas Rumpf
502ac4ed5e fixes a converter handling regression that caused private converters to leak into client modules; fixes #19213; [backport:1.6] (#19229) 2021-12-09 13:56:51 +01:00
flywind
0992854941 Atomic inc/dec should use ATOMIC_SEQ_CST (#19212) 2021-12-08 08:40:35 +01:00
rockcavera
7806ec525e Making TCC work again on Windows --cpu:amd64 - fix #16326 (#19221)
* fix #16326

* removing comments
2021-12-08 06:48:34 +01:00
Tanguy
cd592ed85b fix #19193 (#19195) [backport:1.2] 2021-12-07 18:01:22 +01:00
Andreas Rumpf
93c8427fca re-enable chronos testing once again [backport:1.2] (#19222) 2021-12-07 17:59:43 +01:00
flywind
ebd88725f9 remove sysspawn which is dead code (#19218) 2021-12-06 22:41:42 +01:00
Etan Kissling
0213c7313b allow HSlice bounded by constants of distinct types (#19219) [backport:1.2]
When creating heterogenous slices of distinct types, the compiler does
not initialize the internal type's `size` before accessing it.
This then leads to this crash message:
```
compiler/int128.nim(594, 11) `false` masking only implemented for 1, 2, 4 and 8 bytes [AssertionError]
```
This patch initializes the `size` properly, fixing the problem.
2021-12-06 20:38:23 +01:00
flywind
7e3da693f5 [format minor] remove unnecessary spaces (#19216) 2021-12-06 18:58:01 +01:00
flywind
faacd63bf6 the title of PR should contain a brief description (#19211)
In addition to an issue number, the title of a PR should contain a brief description; then users can follow the progress more easily from the title.
2021-12-06 10:04:54 +01:00
flywind
e5475768ba feature_request should be labelled automatically (#19215) 2021-12-05 07:17:52 +01:00
hlaaftana
1ef945668d treat do with pragmas but no parens as proc (#19191)
fixes #19188
2021-12-05 06:44:22 +01:00
PMunch
c658de24b0 Improve documentation around func and method (#19207)
* Improve documentation around func and method

* Update doc/tut1.rst

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>

* Update doc/tut1.rst

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>

* Update doc/tut1.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/tut1.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/tut1.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/tut1.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/tut1.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/tut1.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/tut1.rst

Co-authored-by: Zoom <ZoomRmc@users.noreply.github.com>

* Update doc/tut1.rst

Co-authored-by: Zoom <ZoomRmc@users.noreply.github.com>

* Update doc/tut1.rst

Co-authored-by: Zoom <ZoomRmc@users.noreply.github.com>

* Update doc/tut1.rst

Co-authored-by: Zoom <ZoomRmc@users.noreply.github.com>

* Rewrite of Zooms suggestion

* Update doc/tut1.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: Zoom <ZoomRmc@users.noreply.github.com>
2021-12-04 07:54:11 +01:00
Andreas Rumpf
1cbdc1573a fixes #19159 [backport:1.6] (#19210) 2021-12-04 07:44:26 +01:00
Andreas Rumpf
f90620fb32 fixes #19198 [backport:1.6] (#19209)
* fixes #19198 [backport:1.6]

* added a test case
2021-12-04 07:43:20 +01:00
Andreas Rumpf
d584dd5b99 fixes #19015 [backport:1.6] (#19204) 2021-12-04 07:42:58 +01:00
Andreas Rumpf
23c117a950 misc bugfixes [backport:1.2] (#19203) 2021-12-04 07:42:34 +01:00
Iced Quinn
373c909300 feat: TLS-ALPN wrappers for OpenSSL (#19202)
Co-authored-by: Iced Quinn <icedquinn@iceworks.cc>
2021-12-04 07:42:03 +01:00
Jaremy Creechley
0d0c249074 swap port to correct port order (#19177)
Co-authored-by: Jaremy Creechley <jaremy.creechley@panthalassa.com>
2021-11-24 17:37:14 +01:00
hlaaftana
f91867aa31 accept object type node from macros (#19179) 2021-11-24 16:34:42 +01:00
Andrey Makarov
a59ad20062 fix inline syntax highlighting in system.nim (#19184) 2021-11-24 16:16:20 +01:00
Andreas Rumpf
a0073d2d4c renamed 'gc' switch to 'mm'; [backport:1.6] (#19187)
* renamed 'gc' switch to 'mm'; [backport:1.6]
* better docs
2021-11-24 15:49:32 +01:00
hlaaftana
c7c6b13a32 parseExpr/parseStmt accept filename, fixes #13540 (#19182) 2021-11-24 12:22:40 +01:00
hlaaftana
ff39f6e260 make JS trunc polyfill opt-in, closes #16144 (#19183) 2021-11-24 08:20:15 +01:00
hlaaftana
2859069dbe fix #12274 (#19180) 2021-11-24 07:08:07 +01:00
hlaaftana
5933aece9b caseStmtMacros no longer experimental, experimental manual refactor (#19173)
* `caseStmtMacros` no longer experimental, experimental manual refactor

* Update doc/manual.rst

* apply review suggestions

* apply review

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-11-23 16:30:17 +01:00
Andrey Makarov
040d23e799 implement RST & Markdown quote blocks (#19147)
* implement RST & Markdown quote blocks

* compile with nim 1.0

* Fix indentation
2021-11-23 13:02:03 +01:00
Jaremy Creechley
7772ca303c Implement threads on Zephyr (#19156)
* pthreads setup for zephyr

- enable tweak stack size
- update lib/system/threads.nim
- Fix int/uint in casting pointer.

* add documentation and tweak flag names

* add documentation and tweak flag names

* fix configuration flag names

* fix configuration flag names

* cleanup

Co-authored-by: Jaremy Creechley <jaremy.creechley@panthalassa.com>
2021-11-23 09:13:03 +01:00
hlaaftana
1b143f5e79 Accept nnkTypeSection from typedef macro pragmas (#19168) 2021-11-22 10:41:35 +01:00
quantimnot
eb5358dcdb Testament now checks OS, CPU, endianess, bitsizes 8-64 in discard statements (#19137)
* Testament checks host/cpu in compiler/platform for discard spec statement

* Remove duplicated value checks, add comments, add all cpu bit sizes and endianesses

Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
2021-11-19 08:19:01 +01:00
OxFred
a8611c665f Update dependency (#19151) 2021-11-17 13:16:12 +01:00
flywind
fe46c8b5f1 fix marshal bugs in VM (#19161) [backport:1.6] 2021-11-17 10:15:54 +01:00
Jaremy Creechley
92d6fb86c6 Enable customizing PageShift to set PageSize for embedded targets (#19129)
* Enable customizing PageSize (via PageShift).

This enables adjusting PageSize for embedded targets without abusing
cpu16.

* copy nimPageXYZ settings for mmpaptest

* add docs for Nim manual

* add docs for Nim manual

* docs tweaks

Co-authored-by: Jaremy Creechley <jaremy.creechley@panthalassa.com>
2021-11-16 20:30:07 +01:00