Changeset 275243 in webkit
- Timestamp:
- Mar 30, 2021 3:46:57 PM (3 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/CMakeLists.txt
r275111 r275243 1045 1045 runtime/RegExpObject.h 1046 1046 runtime/RegExpStringIteratorPrototype.h 1047 runtime/ResourceExhaustion.h 1047 1048 runtime/RuntimeFlags.h 1048 1049 runtime/RuntimeType.h -
trunk/Source/JavaScriptCore/ChangeLog
r275233 r275243 1 2021-03-30 Mark Lam <mark.lam@apple.com> 2 3 Add Options::exitOnResourceExhaustion() to enable exiting instead of crashing on resource exhaustion. 4 https://bugs.webkit.org/show_bug.cgi?id=223959 5 rdar://63934158 6 7 Reviewed by Tadeu Zagallo. 8 9 This is useful to unblock fuzzers from false positive crashes due to resource 10 exhaustion. Currently, this is only applied to StructureID exhaustion. 11 12 Since we're adding this facility, we might as well implement it in such a way that 13 it can be easily deployed for other types of resource exhaustion as well. 14 15 * CMakeLists.txt: 16 * JavaScriptCore.xcodeproj/project.pbxproj: 17 * Sources.txt: 18 * runtime/OptionsList.h: 19 * runtime/ResourceExhaustion.cpp: Added. 20 (JSC::handleResourceExhaustion): 21 * runtime/ResourceExhaustion.h: Added. 22 * runtime/StructureIDTable.cpp: 23 (JSC::StructureIDTable::resize): 24 1 25 2021-03-30 Ryan Haddad <ryanhaddad@apple.com> 2 26 -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r274522 r275243 1989 1989 FE912B5125311AD100FABDDF /* AbstractSlotVisitorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = FE912B5025311AD100FABDDF /* AbstractSlotVisitorInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1990 1990 FE99B2491C24C3D300C82159 /* JITNegGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = FE99B2481C24B6D300C82159 /* JITNegGenerator.h */; }; 1991 FE9F3FB92613C7890069E89F /* ResourceExhaustion.h in Headers */ = {isa = PBXBuildFile; fileRef = FE9F3FB82613C7880069E89F /* ResourceExhaustion.h */; }; 1991 1992 FEA08620182B7A0400F6D851 /* Breakpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FEA0861E182B7A0400F6D851 /* Breakpoint.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1992 1993 FEA08621182B7A0400F6D851 /* DebuggerPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = FEA0861F182B7A0400F6D851 /* DebuggerPrimitives.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 5355 5356 FE99B2471C24B6D300C82159 /* JITNegGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITNegGenerator.cpp; sourceTree = "<group>"; }; 5356 5357 FE99B2481C24B6D300C82159 /* JITNegGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITNegGenerator.h; sourceTree = "<group>"; }; 5358 FE9F3FB82613C7880069E89F /* ResourceExhaustion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceExhaustion.h; sourceTree = "<group>"; }; 5359 FE9F3FBA2613C87C0069E89F /* ResourceExhaustion.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceExhaustion.cpp; sourceTree = "<group>"; }; 5357 5360 FEA0861E182B7A0400F6D851 /* Breakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Breakpoint.h; sourceTree = "<group>"; }; 5358 5361 FEA0861F182B7A0400F6D851 /* DebuggerPrimitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebuggerPrimitives.h; sourceTree = "<group>"; }; … … 7774 7777 84925A9A22B30CBA00D1DFFF /* RegExpStringIteratorPrototype.cpp */, 7775 7778 84925A9B22B30CBA00D1DFFF /* RegExpStringIteratorPrototype.h */, 7779 FE9F3FBA2613C87C0069E89F /* ResourceExhaustion.cpp */, 7780 FE9F3FB82613C7880069E89F /* ResourceExhaustion.h */, 7776 7781 70B0A9D01A9B66200001306A /* RuntimeFlags.h */, 7777 7782 527773DD1AAF83AC00BDE7E8 /* RuntimeType.cpp */, … … 9494 9499 0F4F11EB209D426600709654 /* DFGAbstractValueClobberEpoch.h in Headers */, 9495 9500 0FD3E4021B618AAF00C80E1E /* DFGAdaptiveInferredPropertyValueWatchpoint.h in Headers */, 9501 FE9F3FB92613C7890069E89F /* ResourceExhaustion.h in Headers */, 9496 9502 0F18D3D01B55A6E0002C5C9F /* DFGAdaptiveStructureWatchpoint.h in Headers */, 9497 9503 0F66E16B14DF3F1600B7B2E4 /* DFGAdjacencyList.h in Headers */, -
trunk/Source/JavaScriptCore/Sources.txt
r274522 r275243 975 975 runtime/RegExpPrototype.cpp 976 976 runtime/RegExpStringIteratorPrototype.cpp 977 runtime/ResourceExhaustion.cpp 977 978 runtime/RuntimeType.cpp 978 979 runtime/SamplingCounter.cpp -
trunk/Source/JavaScriptCore/runtime/OptionsList.h
r274609 r275243 377 377 v(Unsigned, exceptionStackTraceLimit, 100, Normal, "Stack trace limit for internal Exception object") \ 378 378 v(Unsigned, defaultErrorStackTraceLimit, 100, Normal, "The default value for Error.stackTraceLimit") \ 379 v(Bool, exitOnResourceExhaustion, false, Normal, nullptr) \ 379 380 v(Bool, useExceptionFuzz, false, Normal, nullptr) \ 380 381 v(Unsigned, fireExceptionFuzzAt, 0, Normal, nullptr) \ -
trunk/Source/JavaScriptCore/runtime/StructureIDTable.cpp
r264630 r275243 1 1 /* 2 * Copyright (C) 2013-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2013-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 #include "StructureIDTable.h" 28 28 29 #include "ResourceExhaustion.h" 29 30 #include <wtf/Atomics.h> 30 31 #include <wtf/DataLog.h> … … 110 111 // If m_size is already s_maximumNumberOfStructures, newCapacity becomes s_maximumNumberOfStructures in the above code. 111 112 // In that case, we should crash because of exhaust of StructureIDs. 112 RELEASE_ASSERT_ WITH_MESSAGE(m_size < newCapacity, "Crash intentionally because of exhaust of StructureIDs.");113 RELEASE_ASSERT_RESOURCE_AVAILABLE(m_size < newCapacity, StructureIDExhaustion, "Crash intentionally because of exhaust of StructureIDs."); 113 114 114 115 // Create the new table.
Note: See TracChangeset
for help on using the changeset viewer.