gecko-dev/mfbt
Gerald Squelart 9b8e47ab12 Bug 1448494 - NonDereferenceable<T> wraps a T* and prevents dereferencing ops - r=froydnj
NonDereferenceable denotes the intent that a pointer will (most likely) not be
dereferenced, but its numeric value may be used for e.g. logging purposes.

Dereferencing operations are explicitly disabled to avoid unintentional misuses.
Casting is still possible between related types (same as with raw pointers),
but pointers stay safely stored inside NonDereferenceable objects. These casts
do not trigger `clang++ -fsanitize=vptr` errors.

MozReview-Commit-ID: 5885pB7hSFR

--HG--
extra : rebase_source : 3c4011da64d84f1b19991742b76bafbffa90d590
2018-03-28 17:48:53 +11:00
..
decimal Bug 1438750 - Remove mfbt/double-conversion.h, and change existing users to instead do #include "double-conversion/double-conversion.h" themselves. r=froydnj on a CLOSED TREE 2018-02-21 10:15:43 +02:00
double-conversion Bug 1446592 - Update our local double_conversion to tip. Also remove one local patch as unnecessary as of MSVC 2010, hacking around prior versions' lack of <stdint.h> support. r=froydnj 2018-03-16 20:25:17 -07:00
tests Bug 1448494 - NonDereferenceable<T> wraps a T* and prevents dereferencing ops - r=froydnj 2018-03-28 17:48:53 +11:00
Algorithm.h Bug 1449094 - Implement constexpr mozilla::AllOf. r=froydnj 2018-03-28 00:01:08 +09:00
Alignment.h Bug 1435382 - fix documentation for AlignedElem; r=me 2018-02-02 15:24:51 -05:00
AllocPolicy.h Bug 1380410 - Add NeverAllocPolicy, r=erahm 2017-07-25 11:26:21 -04:00
AlreadyAddRefed.h Bug 1442304 - make already_AddRefed returnable in registers in non-DEBUG Unix builds; r=glandium,tjr 2018-03-07 14:27:28 -05:00
Array.h
ArrayUtils.h
Assertions.cpp Bug 1338574 - Assertions.cpp can't use MOZ_CRASH_ANNOTATE, so set the crash reason directly. r=froydnj 2017-02-22 15:42:00 -05:00
Assertions.h Bug 1447480 - Add support of MOZ_FALLTHROUGH_ASSERT without any argument r=hsivonen 2018-04-05 11:42:23 +02:00
Atomics.h Bug 1407137 - Implement Swap(Atomic<T, Order>&, Atomic<T, Order>&) = delete; to remove an actually-non-atomic footgun. r=froydnj 2017-10-10 10:19:31 -07:00
Attributes.h Bug 1451248. r=jorendorff, r=bz 2018-04-25 19:40:09 -07:00
BinarySearch.h
BloomFilter.h
BufferList.h Bug 1450232 - in IPC, check that lengths fit in the available data before allocating data; r=mccr8 2018-04-19 16:53:29 -04:00
Casting.h Bug 1295611 - Add mozilla::Span. r=froydnj,gerv. 2017-03-31 13:32:18 +03:00
ChaosMode.cpp
ChaosMode.h
Char16.h Bug 1428541 - Make char16ptr_t::operator bool() explicit. r=froydnj 2017-12-24 23:33:56 +09:00
CheckedInt.h Bug 1356936 - Use __builtin_add/sub/mul_overflow() where available to optimize CheckedInt. r=waldo,ehsan 2017-09-21 18:24:10 +02:00
Compiler.h Bug 1322792 - require GCC 4.9 to build; r=glandium 2016-12-23 05:47:31 -05:00
Compression.cpp Bug 1416183 - Build LZ4 as C instead of including it as C++. r=froydnj 2017-11-15 12:51:01 +09:00
Compression.h Bug 1396026 - Update OTS to accept Awami Nastaliq. r=froydnj,jfkthame 2017-09-07 10:40:59 -07:00
DebugOnly.h
DefineEnum.h Bug 1371771 - Add a MOZ_DEFINE_ENUM macro and variants to MFBT. r=froydnj 2017-06-30 19:58:11 -04:00
DoublyLinkedList.h Bug 1396723 - Use DoublyLinkedList in mozjemalloc. r=froydnj 2017-09-02 08:55:42 +09:00
EndianUtils.h Bug 1413049 - Part 1: Add methods to EndianUtils for pointer-sized integers. r=Waldo. 2018-03-01 11:05:13 -06:00
EnumSet.h Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
EnumTypeTraits.h Bug 1427229 - Perform validation when sending an EnumSet over IPC. r=botond,froydnj 2018-01-21 21:23:21 +01:00
EnumeratedArray.h Initial import of Advanced Layers. (bug 1365879 part 20, r=bas) 2017-06-23 14:23:12 -07:00
EnumeratedRange.h
FStream.h Bug 1441112 - Stop including <iostream> in FStream.h. r=froydnj 2018-02-28 21:45:04 +09:00
FastBernoulliTrial.h
FloatingPoint.cpp
FloatingPoint.h Bug 744965 - Implement mozilla::NumberEqualsInt32 in a way that doesn't depend on undefined behavior casting an out-of-range floating point number to int32_t. r=froydnj 2018-02-15 17:22:14 -08:00
GuardObjects.h Bug 1392885 -Add debug message when misusing the guard object. r=froydnj 2017-08-23 11:59:21 +08:00
HashFunctions.cpp
HashFunctions.h Backed out 2 changesets (bug 1451278) for breaking windows pgo builds a=backout 2018-04-16 21:41:03 +03:00
IntegerPrintfMacros.h Bug 1357873 - Fix up 64-bit Android macros in IntegerPrintfMacros.h; r=Waldo 2017-05-01 14:46:00 -04:00
IntegerRange.h Bug 1315274 - rename mozilla::MakeRange to mozilla::IntegerRange; r=Waldo 2017-01-06 09:22:53 -05:00
IntegerTypeTraits.h
JSONWriter.cpp
JSONWriter.h Bug 1438750 - Remove mfbt/double-conversion.h, and change existing users to instead do #include "double-conversion/double-conversion.h" themselves. r=froydnj on a CLOSED TREE 2018-02-21 10:15:43 +02:00
Likely.h
LinkedList.h Bug 1456875 - Add const iterators for LinkedList r=Waldo 2018-04-30 10:21:31 +01:00
LinuxSignal.h
MacroArgs.h Bug 1369622 - Fix MOZ_FOR_EACH with an empty list. r=froydnj 2017-06-02 14:53:54 +09:00
MacroForEach.h Bug 1368932 - Allow MOZ_PASTE_PREFIX_AND_ARG_COUNT to work with 0 arguments. r=froydnj 2017-05-25 15:47:21 +09:00
MathAlgorithms.h Bug 1443342 - Remove HashFunctions.h's RotateBitsLeft32 and use the general RotateLeft function instead. r=froydnj 2018-03-01 17:05:58 -08:00
Maybe.h Bug 1444125 - don't poison Maybe on construction; r=gerald 2018-04-10 13:46:00 -04:00
MaybeOneOf.h Bug 1339555 - Make various operator-news into a known-non-null pointer use a ::operator new overload that odesn't null-check. r=froydnj 2017-02-14 11:23:18 -08:00
MemoryChecking.h
MemoryReporting.h
Move.h
NonDereferenceable.h Bug 1448494 - NonDereferenceable<T> wraps a T* and prevents dereferencing ops - r=froydnj 2018-03-28 17:48:53 +11:00
NotNull.h Bug 1443367 - Rework MakeNotNull to build with VS 2017 15.6 - r=njn 2018-03-06 20:27:27 +11:00
NullPtr.h
Opaque.h
OperatorNewExtensions.h
Pair.h
Path.h Bug 1428543 - Add mozilla::filesystem::Path and use it in nsIFile. r=froydnj 2017-12-28 03:03:35 +09:00
PodOperations.h
Poison.cpp Bug 1158445 - posix_madvise() should be used instead of madvise on Solaris. r=froydnj, r=jandem 2017-06-09 00:59:32 -07:00
Poison.h Bug 1414901 - part 1b - eliminate alignment requirements for poisoning memory; r=Waldo 2018-03-06 11:35:50 -05:00
Range.h Bug 1295611 - Add mozilla::Span. r=froydnj,gerv. 2017-03-31 13:32:18 +03:00
RangedArray.h
RangedPtr.h
ReentrancyGuard.h
RefCountType.h
RefCounted.h Bug 1385438 - make mozilla::RefCounted use the strongest memory consistency necessary; r=jrmuizel 2017-10-27 13:05:51 -04:00
RefPtr.h Bug 1390568 - manually de-virtualize do_QueryReferent; r=ehsan 2017-08-24 20:04:31 -04:00
Result.h Bug 1448387: Use alignof() in HasFreeLSB. r=froydnj 2018-03-23 19:09:42 +01:00
ResultExtensions.h Bug 1366511: Part 3 - Add mozilla::ToResult() to convert other result types to equivalent Result. r=nbp,ehsan 2017-08-29 21:28:31 -07:00
ReverseIterator.h
RollingMean.h No bug: RollingMean.h doc fix. DONTBUILD r=kentuckyfriedtakahe 2016-12-20 23:11:30 -08:00
SHA1.cpp
SHA1.h
STYLE Bug 1332797 - Move mfbt/double-conversion source files into a new source/ subdirectory, to segregate upstream files from update.sh and our local patches. r=froydnj 2017-01-23 15:11:50 -08:00
Saturate.h
ScopeExit.h Bug 1454052 - make MakeScopeExit a MOZ_MUST_USE function; r=gerald 2018-04-18 12:14:18 -04:00
Scoped.h
SegmentedVector.h Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
SharedLibrary.h Bug 1442275 - Implement a path charset agnostic wrapper for PR_LoadLibraryWithFlags. r=froydnj 2018-04-24 00:31:53 +09:00
SmallPointerArray.h Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
Span.h Bug 1451722 - Constexpr-ify mozilla::Span more. r=hsivonen 2018-04-05 21:55:00 +09:00
SplayTree.h Bug 1381253 - Remove redundant control flow declarations rs=ehsan 2017-07-15 19:03:04 +02:00
Sprintf.h Bug 1334279 - mark vsprintf-likes with MOZ_FORMAT_PRINTF; r=froydnj 2017-05-04 12:10:19 -06:00
StaticAnalysisFunctions.h Bug 1444416: Handle references in the "can run script" checker. r=mystor 2018-03-09 17:51:59 +01:00
TaggedAnonymousMemory.cpp
TaggedAnonymousMemory.h
TemplateLib.h Bug 1338374 - Make tl::Min/Max variadic. r=froydnj 2017-01-30 15:56:05 -08:00
TextUtils.h Bug 1453456 - Replace nsCRT::IsAscii{Alpha,Digit} with mfbt/TextUtils.h versions. r=froydnj 2018-04-12 20:19:30 -07:00
ThreadLocal.h Bug 1417135 - Mark user-defined default constructor for ThreadLocalKeyStorage as constexpr. r=glandium 2017-11-15 01:33:00 -05:00
ThreadSafeWeakPtr.h Bug 1404742 - add ThreadSafeWeakPointer to MFBT. r=nfroyd 2017-10-18 14:21:23 -04:00
ToString.h
Tuple.h
TypeTraits.h Bug 1318677 part 3 - mozilla::Result: Add a new packing strategy to pack small enumerated values in a single word. r=Waldo 2017-02-07 18:57:43 +00:00
TypedEnumBits.h
Types.h Bug 1277338 - Part 7: Export mozglue when JS_STANDALONE && !jemalloc; r=glandium,sfink 2017-08-31 15:59:13 -07:00
UniquePtr.h
UniquePtrExtensions.h
Unused.cpp
Unused.h Bug 1368616 - Error compiling TestBlockingProcess.exe with MinGW: undefined reference to _imp___ZN7mozilla6UnusedE r=froydnj 2017-06-21 11:47:11 +02:00
Variant.h Add IPC support for mozilla::Variant (bug 1371846); r=botond 2017-07-21 07:18:02 -05:00
Vector.h Bug 1329019 - Allow specifying capacity to Vector::replaceRawBuffer (r=froydnj) 2017-09-22 10:34:24 -05:00
WeakPtr.h Bug 1384395 - Use nsAutoOwningThread for mfbt/WeakPtr.h thread assertions (r=froydnj) 2017-07-28 13:11:44 -07:00
WindowsVersion.h Bug 1451296 - Make enabling of font-variation-settings and font-optical-sizing properties dependent on adequate platform support at runtime. r=lsalzman 2018-04-05 18:53:56 +01:00
WrappingOperations.h Bug 1443706 - Introduce ConstExprHashString(const char16_t*). r=jwalden 2018-03-08 10:27:14 +11:00
XorShift128PlusRNG.h Bug 1443342 - Remove XorShift128PlusRNG.h from integer-overflow sanitizer blacklisting. r=froydnj 2018-03-06 09:33:52 -08:00
lz4.c Bug 1430708 - Update lz4 to version 1.8.1.2. r=froydnj 2018-01-22 08:48:44 -05:00
lz4.h Bug 1430708 - Update lz4 to version 1.8.1.2. r=froydnj 2018-01-22 08:48:44 -05:00
moz.build Bug 1448494 - NonDereferenceable<T> wraps a T* and prevents dereferencing ops - r=froydnj 2018-03-28 17:48:53 +11:00