Commit graph

60 commits

Author SHA1 Message Date
Martin Robinson
2f4c47bfe7 Start the transition to workspace dependencies
This will ultimately make it simpler to update crate dependencies and
reduce duplicate when specifying requirements. Generally, this change
does not touch dependencies that are only used by a single crate. We
could consider moving them to workspace dependencies in the future.
2023-05-17 11:59:35 +02:00
sagudev
dffb75a4c6 cargo-fix for 2021 2023-05-07 15:45:56 +02:00
Martin Robinson
7fdf806874 Fix some build warnings 2023-03-27 14:58:44 +02:00
sagudev
9c2cc05a8e Upgrade remaining components to edition 2018 2023-02-18 09:42:37 +01:00
Alex Touchet
9822075277 Use SPDX license format 2022-10-10 15:48:05 -07:00
Teymour Aldridge
3e5cd8815d Fix some Clippy lints. 2022-08-04 00:13:36 +08:00
12101111
0115eb8dd8
Fix UB in hashglobe 2021-10-09 00:01:04 +08:00
Alex Touchet
d132866c5d
More Cargo.toml cleanups 2020-05-14 22:20:18 -07:00
Simon Sapin
94b19beefb Fix some warnings new in Rust Nightly 2019-11-08 11:45:16 +01:00
Anthony Ramine
785a344e32 Update rand to 0.7 (fixes #24448) 2019-10-23 15:34:48 +02:00
Emilio Cobos Álvarez
3cb18071a2 style: Use fallible allocation for stylesheet invalidation.
If the sets get too big we cannot allocate anything else, we'll just empty them
and invalidate the whole document.

Differential Revision: https://phabricator.services.mozilla.com/D46828
2019-10-09 13:21:35 +02:00
Josh Matthews
09f7b6bf36 Upgrade ws. 2019-06-12 15:01:03 -04:00
Simon Sapin
a15d33a10e cargo fix --edition 2018-11-10 17:47:28 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
kingdido999
951bda3600 Format hashglobe #21373 2018-09-09 10:14:36 +08:00
Bastien Orivel
570d865065 Bump ipc-channel and bincode
This required bumping uuid too which unfortunately duplicated rand.
2018-03-21 13:05:47 +01:00
Emilio Cobos Álvarez
25868beabd
style: Back out ordermap.
It was worth a shot!
2018-02-12 12:20:46 +01:00
janczer
661d234c3c Change debug assertions to specific ones 2018-02-07 09:21:24 +01:00
Emilio Cobos Álvarez
a2c2d34753
hashglobe: Add a shim on top of OrderMap. 2018-01-31 15:14:30 +01:00
CYBAI
73bc7a81e9 Use specific negative assertion for hashglobe hash set 2018-01-26 01:55:12 +08:00
CYBAI
d4d32c9962 Use specific negative assertion for hashglobe hash map 2018-01-26 01:54:55 +08:00
Simon Sapin
4be3096040 Add some FIXME comments about using ptr::NonNull 2018-01-22 17:41:26 +01:00
Boris Chiou
aebe2cfac2 Dump the requested aligment if out of memory while allocating a table. 2018-01-02 11:31:03 +08:00
tigercosmos
6d6491e814 deny warnings 2017-12-22 03:34:11 +08:00
Emilio Cobos Álvarez
6c37edf602
hashglobe: Use ? on Option more often. 2017-12-09 20:27:02 +01:00
Boris Chiou
cfe6451d8e hashglobe: Dump more information if out of memory while allocating a table.
Sometimes, we got a crash message:
"called `Result::unwrap()` on an `Err` value: FailedAllocationError {
reason: "out of memory when allocating RawTable" }" on stylo, but
this is not enough to debug, so let's add one more field in
FailedAllocationError, so we can know the size we are allocating.
2017-12-06 16:37:14 +08:00
Bobby Holley
3cffc8c427 Revert "Poison hashtable buffers."
This reverts commit c866486b99.
2017-10-23 13:51:51 -07:00
Manish Goregaokar
b118ba72d0 Revert "Diagnostic map semantics."
This reverts commit f5c5be00a7.
2017-10-23 13:51:08 -07:00
Manish Goregaokar
d6bafde971 Revert "Add canary and journaling."
This reverts commit 58322d0021.
2017-10-23 13:46:05 -07:00
Manish Goregaokar
f7ad19f500 Revert "Assert more things in hashtables."
This reverts commit e5023a3eb4.
2017-10-23 13:45:57 -07:00
Manish Goregaokar
fde96d0ff5 Revert "Stuff HashMap journal into a string and verify invariants in a few more places."
This reverts commit 4b64390b81.
2017-10-23 13:45:48 -07:00
Manish Goregaokar
f98f83ceb3 Revert "Verify in DiagnosticHashMap::drop."
This reverts commit c9b5ffb586.
2017-10-23 13:45:38 -07:00
Manish Goregaokar
f9eff7f546 Revert "Write poison to canary when removing item from diagnostic hashmap"
This reverts commit b547e96b44.
2017-10-23 13:45:17 -07:00
Manish Goregaokar
2931e71d40 Revert "Correct the position and record count of broken canary"
This reverts commit cb2772b46c.
2017-10-23 13:45:09 -07:00
Manish Goregaokar
d48aa12b8d Revert "Report hash value at HashMap corruption location."
This reverts commit f7f898b3b3.
2017-10-23 13:44:58 -07:00
Manish Goregaokar
bf69d1b460 Revert "Include map length in diagnostics"
This reverts commit a10329f8ff.
2017-10-23 13:44:47 -07:00
Manish Goregaokar
a10329f8ff Include map length in diagnostics 2017-10-20 16:31:42 -07:00
Alexis Beingessner
f7f898b3b3
Report hash value at HashMap corruption location. 2017-10-20 15:15:22 +02:00
Nicholas Nethercote
4506f0d30c Replace all uses of the heapsize crate with malloc_size_of.
Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`.
`malloc_size_of` is better -- it handles various cases that `heapsize` does not
-- so this patch changes Servo to use `malloc_size_of`.

This patch makes the following changes to the `malloc_size_of` crate.

- Adds `MallocSizeOf` trait implementations for numerous types, some built-in
  (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`).

- Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't
  support that operation.

- For `HashSet`/`HashMap`, falls back to a computed estimate when
  `enclosing_size_of_op` isn't available.

- Adds an extern "C" `malloc_size_of` function that does the actual heap
  measurement; this is based on the same functions from the `heapsize` crate.

This patch makes the following changes elsewhere.

- Converts all the uses of `heapsize` to instead use `malloc_size_of`.

- Disables the "heapsize"/"heap_size" feature for the external crates that
  provide it.

- Removes the `HeapSizeOf` implementation from `hashglobe`.

- Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of`
  doesn't derive those types, unlike `heapsize`.
2017-10-18 22:20:37 +11:00
Xidorn Quan
cb2772b46c Correct the position and record count of broken canary 2017-10-13 15:39:07 +11:00
Xidorn Quan
b547e96b44 Write poison to canary when removing item from diagnostic hashmap 2017-10-13 15:19:55 +11:00
Bobby Holley
c9b5ffb586 Verify in DiagnosticHashMap::drop. 2017-10-11 10:24:00 -07:00
Bobby Holley
4b64390b81 Stuff HashMap journal into a string and verify invariants in a few more places.
The RegisterAppMemory approach isn't working for some reason.

MozReview-Commit-ID: GjGaq6GALI5
2017-10-10 14:16:56 -07:00
Bobby Holley
e5023a3eb4 Assert more things in hashtables.
MozReview-Commit-ID: H8jKywUewcZ
2017-10-08 22:40:34 -07:00
Bobby Holley
58322d0021 Add canary and journaling.
MozReview-Commit-ID: 582ZiTmcvgs
2017-10-07 12:54:17 -07:00
Bobby Holley
f5c5be00a7 Diagnostic map semantics.
MozReview-Commit-ID: C0a5g6xMPY0
2017-10-07 12:54:15 -07:00
Bobby Holley
c866486b99 Poison hashtable buffers.
MozReview-Commit-ID: 8uLGtFv6X4P
2017-10-04 15:59:04 -07:00
Manish Goregaokar
8bce37e6ba stylo: use FnvHashMap everywhere, remove default HashMap construction methods 2017-10-03 14:10:31 -07:00
Bobby Holley
15b866d8de Revert #18668 - Add mprotect diagnostics for HashMap crash 2017-10-03 12:44:26 -07:00
Julian Seward
419642a2bd Bug 1400754 - stylo: crash on Win64 Asan build. r=manishearth, dmajor.
* adds a hashglobe::alloc::realloc, as that was previously not implemented,
  copying and simplifying from liballoc_system.

* routes malloc and realloc calls through hashglobe::alloc::, instead of
  doing it via direct 'extern "C"' calls.
2017-10-02 20:53:23 +02:00