summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add list of failed test casesbjorn/workBjörn Gustavsson2021-10-151-0/+1
|
* wipBjörn Gustavsson2021-10-154-6/+16
|
* wipBjörn Gustavsson2021-10-151-2/+1
|
* wipBjörn Gustavsson2021-10-151-1/+1
|
* wipBjörn Gustavsson2021-10-154-58/+54
|
* wipBjörn Gustavsson2021-10-151-0/+4
|
* wipBjörn Gustavsson2021-10-153-27/+34
|
* wipBjörn Gustavsson2021-10-153-4/+4
|
* wipBjörn Gustavsson2021-10-152-7/+8
|
* fixup! compiler: Add a new instruction for creating binariesBjörn Gustavsson2021-10-148-224/+302
|
* fixup! compiler: Add a new instruction for creating binariesBjörn Gustavsson2021-10-141-0/+6
|
* fixup! compiler: Add a new instruction for creating binariesBjörn Gustavsson2021-10-142-3/+4
|
* WIP: Work around bug in beam_makeops or packing engineBjörn Gustavsson2021-10-143-3/+3
|
* Update primary bootstrapBjörn Gustavsson2021-10-1469-3/+3
|
* fixup! compiler: Add a new instruction for creating binariesBjörn Gustavsson2021-10-141-3/+6
|
* fixup! Implement the bs_create_bin instructionBjörn Gustavsson2021-10-146-116/+179
|
* Implement the bs_create_bin instructionBjörn Gustavsson2021-10-1429-61/+2425
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the bs_create_bin instruction for the JITs and the emulator. Consider this example module: -module(foo). -export([bin/2, int/2, float/2]). bin(A, B) -> <<A/binary, B/binary>>. int(A, B) -> <<A/integer, B/integer>>. float(A, B) -> <<A/float, B/float>>. var_int(A, Size) -> <<A:Size>>. With the extended error information introduced in this commit, failures to build binaries will be reported like this: 1> c(foo). {ok,foo} 2> foo:bin(2, <<>>). ** exception error: bad argument in function foo:bin/2 (foo.erl, line 4) *** failed constructing binary: segment 1, type 'binary': not a binary 3> foo:bin(<<>>, 42). ** exception error: bad argument in function foo:bin/2 (foo.erl, line 4) *** failed constructing binary: segment 2, type 'binary': not a binary 4> foo:bin(<<>>, <<1:1>>). ** exception error: bad argument in function foo:bin/2 (foo.erl, line 4) *** failed constructing binary: segment 2, type 'binary': the size of the given binary/bitstring is not a multiple of the unit for the segment 5> foo:int(a, 42). ** exception error: bad argument in function foo:int/2 (foo.erl, line 5) *** failed constructing binary: segment 1, type 'integer': not an integer 6> foo:float(<<>>, <<>>). ** exception error: bad argument in function foo:float/2 (foo.erl, line 6) *** failed constructing binary: segment 1, type 'float': not a float or an integer 7> foo:var_int(42, -1). ** exception error: bad argument in function foo:var_int/2 (foo.erl, line 6) *** failed constructing binary: segment 1, type 'integer': the size is negative 8> foo:var_int(42, a). ** exception error: bad argument in function foo:var_int/2 (foo.erl, line 6) *** failed constructing binary: segment 1, type 'integer': the size is not an integer 9> foo:var_int(42, 1 bsl 64). ** exception error: a system limit has been reached in function foo:var_int/2 (foo.erl, line 6) *** failed constructing binary: segment 1, type 'integer': the size is too large Closes #4971.
* compiler: Add a new instruction for creating binariesBjörn Gustavsson2021-10-1419-520/+467
| | | | | | | | | | | | | | Binary construction using the binary syntax currently uses multiple instructions. That makes it hard to provide good information in the exception if construction fails. It also makes it harder to optimize construction in the JIT. Therefore, introduce the instruction `bs_create_bin` that constructs a binary in one go. To be able to test the new instruction before implementing it in the runtime system, force translation back to the old-style instructions in the `beam_clean` pass.
* Clean up the bs_init* helpers and instructionsBjörn Gustavsson2021-10-143-72/+68
| | | | | | Eliminate uncessary gotos. Always test the virtual binary heap when deciding whether a GC is needed (it is currently only done for binaries whose size are given in bytes).
* Enhance the mov_imm() helperBjörn Gustavsson2021-10-142-2/+20
| | | | | Generate a shorter instruction for unsigned immediate values that fit in 32 bits.
* sys_core_fold: Don't replace bad binary segments with error(badarg)Björn Gustavsson2021-10-141-4/+1
| | | | | | | | | | | | | | | | | | | Keep warnings for binary construction that will fail, but don't replace the construction with an `error(badarg)` call to allow the runtime system to add extended information to the exception. For example, `sys_core_fold` will no longer replace the following code: <<F:7/float>> with a call to `error(badarg)`. However, note that v3_core still replaces obviously bad types and sizes with a call to `error(badarg)`. For example, `v3_core` will replace the following construction with a call to `error(badarg)`: <<atom:32>>
* erl_bits: Remove unnecessary type testBjörn Gustavsson2021-10-141-9/+3
| | | | | OTP 25 will refuse to load ancient BEAM files (OTP R11B or earlier) that would need this type test.
* Merge pull request #5270 from frej/frej/pch-raceJohn Högberg2021-10-131-1/+2
|\ | | | | Fix race related to precompiled header during compilation
| * Fix race related to precompiled header during compilationFrej Drejhammar2021-10-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Files matching `erts/emulator/beam/jit/$(JIT_ARCH)/%.cpp` are compiled with the command line flag `-include $(ASMJIT_PCH_SRC)`, but as there is no dependency on `$(ASMJIT_PCH_OBJ)` the compilation of the C++ module will race with the precompilation of `$(ASMJIT_PCH_SRC)`. The missing dependency leads to intermittent build failures as g++ will, when reading an incomplete precompiled header, abort with `cc1plus: error: while reading precompiled header: No such file or directory`. Avoid this race by adding a dependency on `$(ASMJIT_PCH_OBJ)` just as for files matching `erts/emulator/beam/jit/%.cpp` and `erts/emulator/asmjit/%.cpp`.
* | Merge branch 'maint'Cons T Åhs2021-10-132-35/+248
|\ \
| * \ Merge branch 'cons/ssh/connect-informative-error/OTP-17515' into maintCons T Åhs2021-10-132-35/+248
| |\ \
| | * | [ssh] Add better error handling in connect/2,3,4Cons T Åhs2021-10-122-35/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix issues where incorrect arguments might result in a function_clause exception and potential information leakage in a stack trace. * Add tests with incorrectly typed arguments and verify that an informative error is returned rather than an exception. * Add error detection of arguments to connect/2,3,4. * Add better abstraction and collection of errors.
* | | | Merge branch 'maint'Sverker Eriksson2021-10-121-1/+2
|\ \ \ \ | |/ / /
| * | | Merge branch 'sverker/asan_logs_to_html-fix' into maintSverker Eriksson2021-10-121-1/+2
| |\ \ \ | | |/ / | |/| |
| | * | Fix asan_logs_to_html regexSverker Eriksson2021-10-041-1/+2
| | | | | | | | | | | | | | | | when a file ends with an ErrorReport.
* | | | Merge branch 'maint'Cons T Åhs2021-10-125-188/+294
|\ \ \ \ | |/ / /
| * | | Merge pull request #5269 from ↵Cons T Åhs2021-10-125-188/+294
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | lisztspace/cons/httpc-accept-binary-headers/GH-5074/OTP-17579 Cons/httpc accept binary headers/gh 5074/otp 17579
| | * | | [httpc] Allow binary() header values in request/5Cons T Åhs2021-10-114-187/+293
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bug where using a binary() in a header value to request/5 would cause the application to hang. Now allow a binary() as a header value. Extend error checking of arguments to request/5 and be more precise with returned errors when arguments have an invalid type. * Add tests * Catch test problem earlier * Add new tests for header types and other arguments to request/5 * Be more precise when checking the error returned * Code * Abstract construction of header-value string for consistency * Make checking of headers values and arguments consistent and more precise. * Update documentation * Correct types in documentation * Use http_string() instead of string() to avoid possible confusion due to using a well defined system wide type.
| | * | | Fix typoCons T Åhs2021-10-071-1/+1
| | | | |
* | | | | Merge branch 'maint'Hans Nilsson2021-10-121-0/+3
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * maint: ssh: Exclude LibreSSL 2.1.* from Engine tests
| * | | | Merge branch 'hans/crypto/cuddle_tests' into maintHans Nilsson2021-10-121-0/+3
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * hans/crypto/cuddle_tests: ssh: Exclude LibreSSL 2.1.* from Engine tests
| | * | | | ssh: Exclude LibreSSL 2.1.* from Engine testsHans Nilsson2021-10-121-0/+3
| |/ / / / | | | | | | | | | | | | | | | It does not work well for some of the tests
* | | | | Merge branch 'maint'Hans Nilsson2021-10-121-0/+5
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * maint: crypto: Silence CodeChecker
| * | | | Merge branch 'hans/crypto/error_refactor/OTP-17241' into maintHans Nilsson2021-10-121-0/+5
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * hans/crypto/error_refactor/OTP-17241: crypto: Silence CodeChecker
| | * | | | crypto: Silence CodeCheckerHans Nilsson2021-10-071-0/+5
| | | | | |
* | | | | | Merge branch 'maint'Björn Gustavsson2021-10-121-2/+2
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | * maint: Improve argument testing in the bs_add instruction
| * | | | | Merge branch 'bjorn/erts/fortify-bs_add/OTP-17686' into maintBjörn Gustavsson2021-10-121-2/+2
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bjorn/erts/fortify-bs_add/OTP-17686: Improve argument testing in the bs_add instruction
| | * | | | | Improve argument testing in the bs_add instructionBjörn Gustavsson2021-10-081-2/+2
| | | |/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Immediate non-integer values (such as atoms) would not be rejected by bs_add (in the x86 JIT). Therefore, a binary would be allocated, before failing the operation when attempting to fill in the contents of the binary.
* | | | | | Merge branch 'maint'Ingela Anderton Andin2021-10-110-0/+0
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch 'ingela/ssl/interop-PSS-TLS-1.2/GH-5255/OTP-17688' into maintIngela Anderton Andin2021-10-110-0/+0
| |\ \ \ \ \
| | * | | | | ssl: Fix algorithm typoIngela Anderton Andin2021-10-111-1/+1
| | | | | | |
* | | | | | | Merge branch 'maint'Ingela Anderton Andin2021-10-110-0/+0
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge branch 'ingela/ssl/algo-typo-in-OTP-17688' into maintIngela Anderton Andin2021-10-110-0/+0
| |\ \ \ \ \ \
| | * | | | | | ssl: Fix algorithm typoIngela Anderton Andin2021-10-111-1/+1
| | |/ / / / /
* | | | | | | Merge branch 'maint'Ingela Anderton Andin2021-10-111-1/+1
|\ \ \ \ \ \ \ | |/ / / / / /