Bennet Bleßmann
943dce566b
fix clippy
2024-07-06 18:26:34 +02:00
Bennet Bleßmann
b32498b37c
adjust ignore reason
2024-07-06 18:24:38 +02:00
Bennet Bleßmann
ea041a40f9
if UB un IndexPtr ArenaAllocated impl
2024-07-06 17:43:13 +02:00
Bennet Bleßmann
1d66f91a41
replace ref_thread_local::ref_thread_local! with std::thread_local!
...
removes `ref_thread_local` which was still at 0.0.0 released October 2018 while latest 0.1.1 was released mid November 2021
fixes libraries.rs UB
2024-07-06 17:18:26 +02:00
Bennet Bleßmann
fee7ba58b0
fix stack alignement
...
- adjust align() in RawBlockTraits impl for Stack
- ensure ptr is always aligned in RawBlock::allock
2024-07-06 16:21:59 +02:00
Bennet Bleßmann
285f11ccdc
add associated Payload type to ArenaAllocated
2024-07-06 15:37:08 +02:00
Bennet Bleßmann
d87400afa0
switch Rcu to the arcu crate
...
The arcu crate is a more general implementation of the Rcu I implemented in here in scryer. It contains some bug-fixes regarding race-conditions in the Rcu update function, which could cause leaks and uses after free.
Source of the problem was the Relaxed load/strore/update of the reference count in side the Arc not being properly ordered with other load/stores.
2024-07-06 14:49:19 +02:00
Bennet Bleßmann
fcb41542c3
fix stream.rs UB
2024-07-06 14:30:03 +02:00
Bennet Bleßmann
87b4c9d736
somehow this was never marked as bad
2024-07-06 14:30:03 +02:00
Bennet Bleßmann
6386e70584
clippy: change ToString impl to Display
...
- write directly to formatter, eliminating intermediate String allocations
- take Value by reference eliminating clones
- remove trim() called on the result of QueryResolution::to_string
- we only emit "true", "false", or "[<resolutions>]"
neither of which contains trailing or leading withespace,
so the calls was effectively a noop
2024-07-06 13:32:58 +02:00
Bennet Bleßmann
722975d77e
clippy: use type associated constants
2024-07-06 13:08:59 +02:00
Bennet Bleßmann
8943962704
clippy: ptr dereference in safe function
2024-07-06 13:07:26 +02:00
Bennet Bleßmann
ed57ef3d01
clippy: identity conversion
2024-07-06 13:06:50 +02:00
Bennet Bleßmann
9e7d41025a
fix saftey comment
2024-07-06 13:06:24 +02:00
Bennet Bleßmann
d2f236d116
clippy: explicit ptr addrs comparision
...
relevant for wide pointers i.e. pointers with metadata
2024-07-06 13:06:13 +02:00
Bennet Bleßmann
1ff995fedb
clippy: allow new without default
2024-07-06 13:04:55 +02:00
Bennet Bleßmann
1b16c6c73f
clippy: use clone_from rather than clone
2024-07-06 13:03:14 +02:00
Bennet Bleßmann
467a82fe46
run rustfmt
2024-07-06 04:18:02 +02:00
Bennet Bleßmann
ce40f8f10c
update ignore reason
2024-07-06 04:15:30 +02:00
Bennet Bleßmann
d2d451b182
adjust the generation of the LIBRARIES map
...
pre-genrate constants instaed of driectly genrating the literal for the insert
2024-07-06 03:53:22 +02:00
Bennet Bleßmann
52fa51853e
don't use env::current_dir() in miri
2024-07-06 03:53:22 +02:00
Bennet Bleßmann
6575b1b573
fix some more miri errors
...
probably relevant to mthom/scryer-prolog#2438
2024-07-06 03:52:46 +02:00
Bennet Bleßmann
cba81b4dc7
some test pass miri
2024-07-06 02:43:00 +02:00
Bennet Bleßmann
91253917b4
remove rust_beta_channel feature
...
- the msrv (i.e. rust-version in Cargo.toml) is high enough that all gated code can now be used on stabe
2024-07-06 02:24:26 +02:00
Bennet Bleßmann
821358c062
unify pointer width
2024-07-06 01:49:25 +02:00
Bennet Bleßmann
3de0a4e2ad
replace transmut with pointer cast calls
2024-07-06 01:38:13 +02:00
Bennet Bleßmann
b8a3067744
resolve miri error for pstr_iter_tests in atom_table
...
relevant to mthom/scryer-prolog#2438
2024-07-06 01:21:03 +02:00
Bennet Bleßmann
7509cc1a07
adjust alignment calculation
...
- I think this used to overallocate when the alignment was already met
2024-07-06 00:13:46 +02:00
Bennet Bleßmann
dd2548453b
rework some unsafe parts
...
- removed some unsafe
- added some safety comments
- add explicit types to transmute calls
- reworked UntypedArenaPtr -> TypedArenaPtr conversion
might help with mthom/scryer-prolog#2438 , I noticed fewer complains from miri after changing the default impl for `ArenaAllocated::alloc`
2024-07-05 23:45:02 +02:00
Bennet Bleßmann
a93585080c
remove remains of num feature
...
commit c41aba6b90 removed the num feature but a few cfgs remained
2024-07-05 21:29:38 +02:00
Mark Thom
d6ac03552d
Merge pull request #2417 from aarroyoc/fix-2416
...
Manage Float and Double FFI types in structs
2024-06-06 22:33:46 -06:00
Adrián Arroyo Calle
a72632ae85
Manage Float and Double FFI types in structs
2024-06-06 22:18:17 +02:00
Bennet Bleßmann
1a9d10d298
fix two clippy lints
2024-05-28 21:28:18 +02:00
Adrián Arroyo Calle
f4d2839dc7
Fix warnings of dead code
2024-05-27 19:52:02 +02:00
Mark Thom
070f1e8dfa
more generally consider NEGATIVE_SIGN a non-op term ( #2401 )
2024-05-13 14:37:44 -06:00
Mark Thom
42a0d686a5
Merge pull request #2393 from mthom/unsafe_improvements
...
Improve use of unsafe Rust in arena.rs (#2391 )
2024-04-29 16:17:14 -06:00
Mark Thom
f3eea6302d
delay instantiation errors on lists in phrase/3 until runtime ( #1665 , #2396 )
2024-04-29 15:28:17 -06:00
Mark Thom
bcfa0219e2
detect External indices more generally in internalize_constant ( #2395 )
2024-04-29 14:23:14 -06:00
Mark Thom
5e1effc69a
fix failing clippy checks, remove unnecessary code
2024-04-25 20:05:22 -06:00
Mark Thom
be23c74b17
fix wasm tests in unsafe_improvements branch
2024-04-24 21:21:25 -06:00
Mark Thom
a6157a926d
improve use of unsafe Rust in arena.rs ( #2391 )
2024-04-24 20:28:06 -06:00
Mark Thom
9837187183
add nth_partial_strings_tests for bugs raised in #1827 , #2381
2024-04-10 15:50:24 -06:00
Mark Thom
c2657cce37
use common test_framework module for several test suites
2024-04-10 15:47:31 -06:00
Mark Thom
7d6109feca
fix char_offset values in add_pstr_offset_chars ( #2381 )
2024-04-10 15:46:11 -06:00
Mark Thom
cf14b222f2
fix skip_max_list crash on bigint max_steps ( #2382 )
2024-04-09 18:57:53 -06:00
Mark Thom
238343f389
add max_steps to PStr offset ( #2381 )
2024-04-09 18:40:08 -06:00
Mark Thom
77e90ca725
correct offsets around max_steps in skip_max_list ( #2381 )
2024-04-09 15:58:23 -06:00
Mark Thom
aab6567750
treat Utf8Error::valid_up_to as an offset form self.pos, which it is ( #2374 )
2024-04-03 15:29:29 -06:00
Mark Thom
ea9e24f214
Merge pull request #2367 from triska/dcg_meta_predicates
...
ADDED: meta_predicate/1 declarations for (',')//2 and (;)//2
2024-03-26 15:21:37 -06:00
Mark
40fc4f9392
correct offset retrieval in add_pstr_chars_and_step ( #2370 )
2024-03-25 12:47:45 -06:00