Repository navigation
Commit 9b61e37
committed
Prepare for -Wunsafe-buffer-usage-in-libc-call
https://bugs.webkit.org/show_bug.cgi?id=286175
rdar://143158556
Reviewed by Chris Dumez.
I enabled the setting locally and bracketed the failures with skip macros.
I also fixed a couple hyper-trivial cases.
We now have an Apple-port specific skip, so Apple engineers searching for
skips needs two regexes:
WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN(?! //.*port)
and
WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN.*[^-]Apple
* Source/JavaScriptCore/API/PASReportCrashPrivate.cpp:
* Source/JavaScriptCore/API/tests/ExecutionTimeLimitTest.cpp:
* Source/JavaScriptCore/API/tests/FunctionOverridesTest.cpp:
(testFunctionOverrides):
* Source/JavaScriptCore/API/tests/FunctionToStringTests.cpp:
(testFunctionToString):
* Source/JavaScriptCore/API/tests/JSObjectGetProxyTargetTest.cpp:
(testJSObjectGetProxyTarget):
* Source/JavaScriptCore/API/tests/MultithreadedMultiVMExecutionTest.cpp:
(startMultithreadedMultiVMExecutionTest):
* Source/JavaScriptCore/API/tests/testapi.mm:
(blockSignatureContainsClass):
(cacheFileInDataVault):
* Source/JavaScriptCore/Scripts/wkbuiltins/builtins_templates.py:
* Source/JavaScriptCore/assembler/AssemblerCommon.h:
* Source/JavaScriptCore/assembler/Printer.h:
* Source/JavaScriptCore/b3/B3ValueRep.h:
* Source/JavaScriptCore/b3/testb3.h:
* Source/JavaScriptCore/bytecode/PropertyCondition.h:
(JSC::PropertyCondition::PropertyCondition):
* Source/JavaScriptCore/bytecode/SpeculatedType.cpp:
(JSC::speculationFromString):
* Source/JavaScriptCore/dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::ensureCanInitializeWithZeros):
* Source/JavaScriptCore/dfg/DFGVariableEvent.cpp:
* Source/JavaScriptCore/heap/BlockDirectory.cpp:
(JSC::BlockDirectory::dumpBits):
* Source/JavaScriptCore/heap/Heap.cpp:
(JSC::Heap::runFixpointPhase):
* Source/JavaScriptCore/heap/PreciseAllocation.cpp:
(JSC::PreciseAllocation::tryReallocate):
* Source/JavaScriptCore/inspector/ContentSearchUtilities.cpp:
(Inspector::ContentSearchUtilities::escapeStringForRegularExpressionSource):
* Source/JavaScriptCore/jit/CallFrameShuffler.cpp:
* Source/JavaScriptCore/jit/ExecutableAllocator.cpp:
(JSC::initializeSeparatedWXHeaps):
* Source/JavaScriptCore/jit/ICStats.cpp:
(JSC::ICEvent::operator< const):
* Source/JavaScriptCore/jsc.cpp:
* Source/JavaScriptCore/runtime/ExceptionFuzz.cpp:
(JSC::doExceptionFuzzing):
* Source/JavaScriptCore/runtime/FuzzerPredictions.cpp:
(JSC::readFileIntoString):
* Source/JavaScriptCore/runtime/GenericTypedArrayViewInlines.h:
(JSC::GenericTypedArrayView<Adaptor>::tryCreate):
* Source/JavaScriptCore/runtime/IndexingType.cpp:
(JSC::dumpIndexingType):
* Source/JavaScriptCore/runtime/InitializeThreading.cpp:
* Source/JavaScriptCore/runtime/Options.cpp:
* Source/JavaScriptCore/runtime/VM.cpp:
(JSC::enableAssembler):
* Source/JavaScriptCore/tools/CompilerTimingScope.cpp:
* Source/JavaScriptCore/tools/FunctionOverrides.cpp:
(JSC::parseClause):
(JSC::FunctionOverrides::parseOverridesInFile):
* Source/JavaScriptCore/tools/Integrity.cpp:
* Source/JavaScriptCore/wasm/WasmValueLocation.h:
* Source/WTF/wtf/DateMath.cpp:
(WTF::findMonth):
(WTF::parseInt):
(WTF::parseLong):
* Source/WTF/wtf/FastMalloc.cpp:
* Source/WTF/wtf/FastMalloc.h:
* Source/WTF/wtf/FilePrintStream.cpp:
(WTF::FilePrintStream::vprintf):
* Source/WTF/wtf/Int128.cpp:
(WTF::printInternal):
* Source/WTF/wtf/LockedPrintStream.cpp:
(WTF::LockedPrintStream::vprintf):
* Source/WTF/wtf/NumberOfCores.cpp:
(WTF::numberOfProcessorCores):
* Source/WTF/wtf/PrintStream.cpp:
* Source/WTF/wtf/PrintStream.h:
(WTF::printInternal):
* Source/WTF/wtf/SafeStrerror.cpp:
(WTF::safeStrerror):
* Source/WTF/wtf/ScopedPrintStream.h:
* Source/WTF/wtf/StackTrace.cpp:
(WTF::StackTracePrinter::dump const):
* Source/WTF/wtf/StringPrintStream.cpp:
* Source/WTF/wtf/SystemMalloc.h:
(WTF::SystemMalloc::zeroedMalloc):
(WTF::SystemMalloc::tryZeroedMalloc):
* Source/WTF/wtf/URL.cpp:
(WTF::URL::print const):
* Source/WTF/wtf/cocoa/CrashReporter.cpp:
(WTF::setCrashLogMessage):
* Source/WTF/wtf/cocoa/FileSystemCocoa.mm:
(WTF::FileSystemImpl::openTemporaryFile):
* Source/WTF/wtf/cocoa/NSURLExtras.mm:
(WTF::readIDNAllowedScriptListFile):
* Source/WTF/wtf/cocoa/SystemTracingCocoa.cpp:
(WTFSignpostHandleIndirectLog):
* Source/WTF/wtf/darwin/LibraryPathDiagnostics.mm:
(WTF::LibraryPathDiagnosticsLogger::logError):
* Source/WTF/wtf/dtoa/utils.h:
(WTF::double_conversion::StrLength):
(WTF::double_conversion::StringBuilder::AddSubstring):
(WTF::double_conversion::StringBuilder::Finalize):
* Source/WTF/wtf/posix/ThreadingPOSIX.cpp:
(WTF::Thread::initializePlatformThreading):
* Source/WTF/wtf/text/ASCIILiteral.h:
(WTF::operator==):
* Source/WTF/wtf/text/CString.cpp:
(WTF::operator==):
(WTF::operator<):
* Source/WTF/wtf/text/StringCommon.h:
(WTF::span8):
(WTF::span8IncludingNullTerminator):
(WTF::span):
(WTF::spanIncludingNullTerminator):
* Source/WTF/wtf/text/TextStream.cpp:
(WTF::TextStream::operator<<):
* Source/WTF/wtf/text/icu/UTextProvider.cpp:
(WTF::uTextCloneImpl):
* Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp:
(WTF::uTextLatin1Clone):
(WTF::openLatin1UTextProvider):
* Source/WTF/wtf/threads/Signals.cpp:
* Source/WTF/wtf/unicode/icu/CollatorICU.cpp:
(WTF::copyShortASCIIString):
(WTF::localesMatch):
(WTF::createIterator):
* Source/WebCore/Modules/websockets/WebSocketExtensionParser.cpp:
(WebCore::isSeparator):
* Source/WebCore/PAL/pal/text/TextCodec.cpp:
(PAL::TextCodec::getUnencodableReplacement):
* Source/WebCore/PAL/pal/text/TextCodecICU.cpp:
(PAL::TextCodecICU::createICUConverter const):
(PAL::ErrorCallbackSetter::~ErrorCallbackSetter):
* Source/WebCore/PAL/pal/text/TextEncodingRegistry.cpp:
(PAL::isUndesiredAlias):
(PAL::WTF_REQUIRES_LOCK):
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(accessibilitySearchCriteriaForSearchPredicate):
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(parameterizedAttributeValueForTesting):
(formatForDebugger):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
* Source/WebCore/css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::CSSSelectorList):
* Source/WebCore/css/StyleProperties.cpp:
(WebCore::StyleProperties::showStyle):
* Source/WebCore/dom/ElementData.cpp:
(WebCore::UniqueElementData::UniqueElementData):
* Source/WebCore/dom/Node.cpp:
(WebCore::Node::dumpStatistics):
(WebCore::showSubTreeAcrossFrame):
* Source/WebCore/dom/Position.cpp:
* Source/WebCore/dom/TextDecoder.cpp:
(WebCore::TextDecoder::create):
* Source/WebCore/editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::debugPosition const):
* Source/WebCore/editing/VisibleSelection.cpp:
* Source/WebCore/history/HistoryItem.cpp:
(WebCore::HistoryItem::showTreeWithIndent const):
* Source/WebCore/html/HTMLAttachmentElement.cpp:
(WebCore::compactStackTrace):
* Source/WebCore/html/HTMLElement.cpp:
(dumpInnerHTML):
* Source/WebCore/html/ImageDataArray.cpp:
(WebCore::fillTypedArray):
* Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::printLayoutTreeForLiveDocuments):
* Source/WebCore/loader/TextResourceDecoder.h:
(WebCore::TextResourceDecoder::setAlwaysUseUTF8):
* Source/WebCore/loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::dump):
* Source/WebCore/page/FrameTree.cpp:
* Source/WebCore/page/PrintContext.cpp:
(WebCore::PrintContext::pageProperty):
* Source/WebCore/platform/FileHandle.cpp:
* Source/WebCore/platform/SharedMemory.cpp:
(WebCore::isMemoryAttributionDisabled):
* Source/WebCore/platform/audio/SincResampler.cpp:
(WebCore::SincResampler::SincResampler):
* Source/WebCore/platform/audio/cocoa/WebAudioBufferList.cpp:
(WebCore::WebAudioBufferList::WebAudioBufferList):
(WebCore::WebAudioBufferList::reset):
* Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::getBufferSubDataImpl):
* Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::prepare):
* Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
(WebCore::initializeEGLDisplay):
(WebCore::GraphicsContextGLCocoa::platformInitializeContext):
* Source/WebCore/platform/graphics/cocoa/TransformationMatrixCocoa.cpp:
* Source/WebCore/platform/graphics/cocoa/WebMAudioUtilitiesCocoa.mm:
(WebCore::parseOpusPrivateData):
* Source/WebCore/platform/mac/CursorMac.mm:
(WebCore::cursor):
* Source/WebCore/platform/network/FormDataBuilder.cpp:
(WebCore::FormDataBuilder::appendFormURLEncoded):
* Source/WebCore/platform/sql/SQLiteFileSystem.cpp:
(WebCore::SQLiteFileSystem::setCanSuspendLockedFileAttribute):
* Source/WebCore/platform/text/SegmentedString.cpp:
(WebCore::SegmentedString::advancePastSlowCase):
* Source/WebCore/platform/text/SegmentedString.h:
(WebCore::SegmentedString::advancePast):
* Source/WebCore/rendering/CounterNode.cpp:
(WebCore::showTreeAndMark):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::showLayerTree):
* Source/WebCore/rendering/RenderQuote.cpp:
(WebCore::subtagCompare):
(WebCore::quotesForLanguage):
* Source/WebGPU/WebGPU/RenderBundle.mm:
(WebGPU::RenderBundle::RenderBundle):
* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::RenderBundleEncoder::RenderBundleEncoder):
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::RenderPassEncoder):
* Source/WebGPU/WebGPU/RenderPipeline.mm:
(WebGPU::RenderPipeline::RenderPipeline):
* Source/WebKit/NetworkProcess/Authentication/cocoa/AuthenticationManagerCocoa.mm:
(WebKit::AuthenticationManager::initializeConnection):
* Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::deleteOldVersions):
* Source/WebKit/Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocationArguments):
(crashWithClassName):
(decodeInvocationArguments):
* Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
(-[_WKRemoteObjectRegistry _invokeMethod:]):
* Source/WebKit/Shared/Cocoa/CoreIPCNSValue.mm:
(WebKit::CoreIPCNSValue::valueFromNSValue):
* Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:
(WebKit::SandboxExtensionImpl::create):
(WebKit::SandboxExtensionImpl::~SandboxExtensionImpl):
(WebKit::SandboxExtensionImpl::getSerializedFormat):
(WebKit::SandboxExtension::createHandleForTemporaryFile):
* Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm:
* Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCEndpointMessages.mm:
(WebKit::handleXPCEndpointMessage):
* Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceEventHandler):
* Source/WebKit/Shared/Extensions/WebExtensionUtilities.cpp:
* Source/WebKit/Shared/Extensions/_WKWebExtensionSQLiteDatatypeTraits.h:
(WebKit::_WKWebExtensionSQLiteDatatypeTraits<NSNumber::bind):
* Source/WebKit/Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::initializeTimers):
(WebKit::WebMemorySampler::stop):
(WebKit::WebMemorySampler::stopTimerFired):
* Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::compileAndCacheSandboxProfile):
(WebKit::tryApplyCachedSandbox):
* Source/WebKit/Shared/mac/WebMemorySampler.mac.mm:
(WebKit::WebMemorySampler::sampleSystemMalloc const):
* Source/WebKit/UIProcess/Cocoa/WebKitSwiftSoftLink.mm:
(WebKit::WebKitSwiftLibrary):
* Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:
(WebKit::ProcessLauncher::finishLaunchingProcess):
* Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:
(WebKit::pathToPDFOnDisk):
* Source/WebKit/WebProcess/Plugins/PDF/PDFScriptEvaluation.mm:
(WebKit::PDFScriptEvaluation::pdfDocumentContainsPrintScript):
* Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
* Source/WebKit/webpushd/webpushtool/WebPushToolConnection.mm:
(WebPushTool::Connection::connectToService):
(WebPushTool::Connection::sendPushMessage):
(WebPushTool::Connection::getPushPermissionState):
(WebPushTool::Connection::requestPushPermission):
(WebPushTool::Connection::sendAuditToken):
* Source/WebKit/webpushd/webpushtool/WebPushToolMain.mm:
* Source/bmalloc/bmalloc/CompactAllocationMode.h:
Canonical link: https://commits.webkit.org/289133@main1 parent 0160d3a commit 9b61e37
131 files changed
Lines changed: 440 additions & 7 deletions
File tree
- Source
- JavaScriptCore
- API
- tests
- Scripts/wkbuiltins
- assembler
- b3
- bytecode
- dfg
- heap
- inspector
- jit
- runtime
- tools
- wasm
- WTF/wtf
- cocoa
- darwin
- dtoa
- posix
- text
- icu
- threads
- unicode/icu
- WebCore
- Modules/websockets
- PAL/pal/text
- accessibility/mac
- css
- dom
- editing
- history
- html
- layout/layouttree
- loader
- appcache
- page
- platform
- audio
- cocoa
- graphics
- angle
- avfoundation
- cocoa
- mac
- network
- sql
- text
- rendering
- WebGPU/WebGPU
- WebKit
- NetworkProcess
- Authentication/cocoa
- cache
- UIProcess
- Cocoa
- Launcher/cocoa
- mac
- WebProcess
- Plugins/PDF
- WebPage/mac
- webpushd/webpushtool
- bmalloc/bmalloc
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| 39 | + | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
564 | 566 | | |
565 | 567 | | |
566 | 568 | | |
| 569 | + | |
| 570 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
| 111 | + | |
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| 103 | + | |
101 | 104 | | |
| 105 | + | |
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| 91 | + | |
89 | 92 | | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| 97 | + | |
93 | 98 | | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
| 121 | + | |
115 | 122 | | |
| 123 | + | |
116 | 124 | | |
117 | 125 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| 496 | + | |
496 | 497 | | |
| 498 | + | |
497 | 499 | | |
498 | 500 | | |
499 | 501 | | |
| |||
2088 | 2090 | | |
2089 | 2091 | | |
2090 | 2092 | | |
| 2093 | + | |
2091 | 2094 | | |
| 2095 | + | |
2092 | 2096 | | |
2093 | 2097 | | |
2094 | 2098 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| 359 | + | |
| 360 | + | |
359 | 361 | | |
360 | 362 | | |
361 | 363 | | |
| |||
404 | 406 | | |
405 | 407 | | |
406 | 408 | | |
| 409 | + | |
| 410 | + | |
407 | 411 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| 61 | + | |
59 | 62 | | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
0 commit comments