autogenerate fuzzing data from spec (#95)
This commit is contained in:
@@ -1,90 +1,152 @@
|
||||
"MD5"
|
||||
"SHA1"
|
||||
"SHA256"
|
||||
"__restart"
|
||||
"accessType"
|
||||
"accessTypes"
|
||||
"adapterData"
|
||||
"adapterID"
|
||||
"additionalModuleColumns"
|
||||
"address"
|
||||
"addressRange"
|
||||
"algorithm"
|
||||
"all"
|
||||
"allThreadsContinued"
|
||||
"allThreadsStopped"
|
||||
"allowPartial"
|
||||
"always"
|
||||
"areas"
|
||||
"args"
|
||||
"argsCanBeInterpretedByShell"
|
||||
"arguments"
|
||||
"attach"
|
||||
"attachForSuspendedLaunch"
|
||||
"attributeName"
|
||||
"attributes"
|
||||
"baseClass"
|
||||
"body"
|
||||
"boolean"
|
||||
"breakMode"
|
||||
"breakpoint"
|
||||
"breakpointLocations"
|
||||
"breakpoints"
|
||||
"bytesWritten"
|
||||
"canPersist"
|
||||
"canRestart"
|
||||
"cancel"
|
||||
"cancellable"
|
||||
"cancelled"
|
||||
"capabilities"
|
||||
"category"
|
||||
"changed"
|
||||
"checksum"
|
||||
"checksums"
|
||||
"class"
|
||||
"clientID"
|
||||
"clientName"
|
||||
"clipboard"
|
||||
"color"
|
||||
"column"
|
||||
"columnsStartAt1"
|
||||
"command"
|
||||
"completions"
|
||||
"completionTriggerCharacters"
|
||||
"completions"
|
||||
"condition"
|
||||
"conditionDescription"
|
||||
"configuration"
|
||||
"configurationDone"
|
||||
"console"
|
||||
"constructor"
|
||||
"content"
|
||||
"context"
|
||||
"continue"
|
||||
"continued"
|
||||
"count"
|
||||
"customcolor"
|
||||
"cwd"
|
||||
"data"
|
||||
"data breakpoint"
|
||||
"dataBreakpoint"
|
||||
"dataBreakpointInfo"
|
||||
"dataId"
|
||||
"dateTimeStamp"
|
||||
"deemphasize"
|
||||
"default"
|
||||
"description"
|
||||
"detail"
|
||||
"details"
|
||||
"disassemble"
|
||||
"disconnect"
|
||||
"emphasize"
|
||||
"end"
|
||||
"endColumn"
|
||||
"endLine"
|
||||
"entry"
|
||||
"enum"
|
||||
"env"
|
||||
"error"
|
||||
"evaluate"
|
||||
"evaluateName"
|
||||
"event"
|
||||
"exception"
|
||||
"exceptionBreakpointFilters"
|
||||
"exceptionId"
|
||||
"exceptionInfo"
|
||||
"exceptionOptions"
|
||||
"exitCode"
|
||||
"exited"
|
||||
"expensive"
|
||||
"expression"
|
||||
"expression"
|
||||
"filter"
|
||||
"external"
|
||||
"field"
|
||||
"file"
|
||||
"filter"
|
||||
"filterId"
|
||||
"filterOptions"
|
||||
"filters"
|
||||
"final"
|
||||
"format"
|
||||
"frameId"
|
||||
"fullTypeName"
|
||||
"function"
|
||||
"function breakpoint"
|
||||
"goto"
|
||||
"gotoTargets"
|
||||
"granularity"
|
||||
"group"
|
||||
"hex"
|
||||
"hitBreakpointIds"
|
||||
"hitCondition"
|
||||
"hover"
|
||||
"id"
|
||||
"important"
|
||||
"includeAll"
|
||||
"indexed"
|
||||
"indexedVariables"
|
||||
"indexedVariables"
|
||||
"initialize"
|
||||
"initialized"
|
||||
"innerClass"
|
||||
"innerException"
|
||||
"instruction"
|
||||
"instruction breakpoint"
|
||||
"instructionBytes"
|
||||
"instructionCount"
|
||||
"instructionOffset"
|
||||
"instructionPointerReference"
|
||||
"instructionReference"
|
||||
"instructions"
|
||||
"integrated"
|
||||
"interface"
|
||||
"internal"
|
||||
"invalidated"
|
||||
"isLocalProcess"
|
||||
"isOptimized"
|
||||
"isUserCode"
|
||||
"keyword"
|
||||
"kind"
|
||||
"label"
|
||||
"launch"
|
||||
"lazy"
|
||||
"length"
|
||||
"levels"
|
||||
"line"
|
||||
@@ -93,27 +155,38 @@
|
||||
"loadedSource"
|
||||
"loadedSources"
|
||||
"locale"
|
||||
"locals"
|
||||
"location"
|
||||
"logMessage"
|
||||
"memory"
|
||||
"memoryReference"
|
||||
"message"
|
||||
"method"
|
||||
"mimeType"
|
||||
"module"
|
||||
"moduleCount"
|
||||
"moduleId"
|
||||
"modules"
|
||||
"mostDerivedClass"
|
||||
"name"
|
||||
"named"
|
||||
"namedVariables"
|
||||
"names"
|
||||
"negate"
|
||||
"never"
|
||||
"new"
|
||||
"next"
|
||||
"noDebug"
|
||||
"normal"
|
||||
"notStopped"
|
||||
"number"
|
||||
"offset"
|
||||
"origin"
|
||||
"output"
|
||||
"parameterNames"
|
||||
"parameters"
|
||||
"parameterTypes"
|
||||
"parameterValues"
|
||||
"parameters"
|
||||
"path"
|
||||
"pathFormat"
|
||||
"pause"
|
||||
@@ -121,17 +194,32 @@
|
||||
"pointerSize"
|
||||
"presentationHint"
|
||||
"preserveFocusHint"
|
||||
"private"
|
||||
"process"
|
||||
"processId"
|
||||
"progressEnd"
|
||||
"progressId"
|
||||
"progressStart"
|
||||
"progressUpdate"
|
||||
"property"
|
||||
"protected"
|
||||
"public"
|
||||
"read"
|
||||
"readMemory"
|
||||
"readWrite"
|
||||
"reason"
|
||||
"reference"
|
||||
"registers"
|
||||
"removed"
|
||||
"repl"
|
||||
"request"
|
||||
"requestId"
|
||||
"request_seq"
|
||||
"resolveSymbols"
|
||||
"response"
|
||||
"restart"
|
||||
"restartFrame"
|
||||
"result"
|
||||
"reverseContinue"
|
||||
"runInTerminal"
|
||||
"scopes"
|
||||
@@ -144,41 +232,66 @@
|
||||
"setExceptionBreakpoints"
|
||||
"setExpression"
|
||||
"setFunctionBreakpoints"
|
||||
"setInstructionBreakpoints"
|
||||
"setVariable"
|
||||
"shellProcessId"
|
||||
"showUser"
|
||||
"singleThread"
|
||||
"snippet"
|
||||
"sortText"
|
||||
"source"
|
||||
"sourceModified"
|
||||
"sourceReference"
|
||||
"sources"
|
||||
"stackFrameId"
|
||||
"stackFrames"
|
||||
"stackTrace"
|
||||
"stacks"
|
||||
"start"
|
||||
"startCollapsed"
|
||||
"startDebugging"
|
||||
"startFrame"
|
||||
"startMethod"
|
||||
"startModule"
|
||||
"started"
|
||||
"statement"
|
||||
"stderr"
|
||||
"stdout"
|
||||
"step"
|
||||
"stepBack"
|
||||
"stepIn"
|
||||
"stepInTargets"
|
||||
"stepOut"
|
||||
"stopped"
|
||||
"string"
|
||||
"subtle"
|
||||
"success"
|
||||
"supportSuspendDebuggee"
|
||||
"supportTerminateDebuggee"
|
||||
"supportedChecksumAlgorithms"
|
||||
"supportsArgsCanBeInterpretedByShell"
|
||||
"supportsBreakpointLocationsRequest"
|
||||
"supportsCancelRequest"
|
||||
"supportsClipboardContext"
|
||||
"supportsCompletionsRequest"
|
||||
"supportsCondition"
|
||||
"supportsConditionalBreakpoints"
|
||||
"supportsConfigurationDoneRequest"
|
||||
"supportsDataBreakpoints"
|
||||
"supportsDelayedStackTraceLoading"
|
||||
"supportsDisassembleRequest"
|
||||
"supportsEvaluateForHovers"
|
||||
"supportsExceptionFilterOptions"
|
||||
"supportsExceptionInfoRequest"
|
||||
"supportsExceptionOptions"
|
||||
"supportsFunctionBreakpoints"
|
||||
"supportsGotoTargetsRequest"
|
||||
"supportsHitConditionalBreakpoints"
|
||||
"supportsInstructionBreakpoints"
|
||||
"supportsInvalidatedEvent"
|
||||
"supportsLoadedSourcesRequest"
|
||||
"supportsLogPoints"
|
||||
"supportsMemoryEvent"
|
||||
"supportsMemoryReferences"
|
||||
"supportsModulesRequest"
|
||||
"supportsProgressReporting"
|
||||
@@ -188,38 +301,57 @@
|
||||
"supportsRunInTerminalRequest"
|
||||
"supportsSetExpression"
|
||||
"supportsSetVariable"
|
||||
"supportsSingleThreadExecutionRequests"
|
||||
"supportsStartDebuggingRequest"
|
||||
"supportsStepBack"
|
||||
"supportsStepInTargetsRequest"
|
||||
"supportsSteppingGranularity"
|
||||
"supportsTerminateRequest"
|
||||
"supportsTerminateThreadsRequest"
|
||||
"supportsValueFormattingOptions"
|
||||
"supportsVariablePaging"
|
||||
"supportsVariableType"
|
||||
"supportTerminateDebuggee"
|
||||
"supportsWriteMemoryRequest"
|
||||
"suspendDebuggee"
|
||||
"symbol"
|
||||
"symbolFilePath"
|
||||
"symbolStatus"
|
||||
"systemProcessId"
|
||||
"targetId"
|
||||
"targets"
|
||||
"telemetry"
|
||||
"terminate"
|
||||
"terminated"
|
||||
"terminateDebuggee"
|
||||
"terminateThreads"
|
||||
"terminated"
|
||||
"text"
|
||||
"thread"
|
||||
"threadId"
|
||||
"threadIds"
|
||||
"threads"
|
||||
"timestamp"
|
||||
"title"
|
||||
"title"
|
||||
"totalFrames"
|
||||
"totalModules"
|
||||
"type"
|
||||
"typeName"
|
||||
"unhandled"
|
||||
"unit"
|
||||
"unixTimestampUTC"
|
||||
"unreadableBytes"
|
||||
"uri"
|
||||
"url"
|
||||
"urlLabel"
|
||||
"userUnhandled"
|
||||
"value"
|
||||
"variable"
|
||||
"variables"
|
||||
"variablesReference"
|
||||
"verified"
|
||||
"version"
|
||||
"virtual"
|
||||
"visibility"
|
||||
"width"
|
||||
"watch"
|
||||
"width"
|
||||
"write"
|
||||
"writeMemory"
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "dap/protocol.h"
|
||||
#include "dap/session.h"
|
||||
|
||||
#include "fuzz.h"
|
||||
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
|
||||
@@ -52,53 +54,6 @@ class Event {
|
||||
|
||||
} // namespace
|
||||
|
||||
// List of requests that we handle for fuzzing.
|
||||
#define DAP_REQUEST_LIST() \
|
||||
DAP_REQUEST(dap::AttachRequest, dap::AttachResponse) \
|
||||
DAP_REQUEST(dap::BreakpointLocationsRequest, \
|
||||
dap::BreakpointLocationsResponse) \
|
||||
DAP_REQUEST(dap::CancelRequest, dap::CancelResponse) \
|
||||
DAP_REQUEST(dap::CompletionsRequest, dap::CompletionsResponse) \
|
||||
DAP_REQUEST(dap::ConfigurationDoneRequest, dap::ConfigurationDoneResponse) \
|
||||
DAP_REQUEST(dap::ContinueRequest, dap::ContinueResponse) \
|
||||
DAP_REQUEST(dap::DataBreakpointInfoRequest, dap::DataBreakpointInfoResponse) \
|
||||
DAP_REQUEST(dap::DisassembleRequest, dap::DisassembleResponse) \
|
||||
DAP_REQUEST(dap::DisconnectRequest, dap::DisconnectResponse) \
|
||||
DAP_REQUEST(dap::EvaluateRequest, dap::EvaluateResponse) \
|
||||
DAP_REQUEST(dap::ExceptionInfoRequest, dap::ExceptionInfoResponse) \
|
||||
DAP_REQUEST(dap::GotoRequest, dap::GotoResponse) \
|
||||
DAP_REQUEST(dap::GotoTargetsRequest, dap::GotoTargetsResponse) \
|
||||
DAP_REQUEST(dap::InitializeRequest, dap::InitializeResponse) \
|
||||
DAP_REQUEST(dap::LaunchRequest, dap::LaunchResponse) \
|
||||
DAP_REQUEST(dap::LoadedSourcesRequest, dap::LoadedSourcesResponse) \
|
||||
DAP_REQUEST(dap::ModulesRequest, dap::ModulesResponse) \
|
||||
DAP_REQUEST(dap::NextRequest, dap::NextResponse) \
|
||||
DAP_REQUEST(dap::PauseRequest, dap::PauseResponse) \
|
||||
DAP_REQUEST(dap::ReadMemoryRequest, dap::ReadMemoryResponse) \
|
||||
DAP_REQUEST(dap::RestartFrameRequest, dap::RestartFrameResponse) \
|
||||
DAP_REQUEST(dap::RestartRequest, dap::RestartResponse) \
|
||||
DAP_REQUEST(dap::ReverseContinueRequest, dap::ReverseContinueResponse) \
|
||||
DAP_REQUEST(dap::RunInTerminalRequest, dap::RunInTerminalResponse) \
|
||||
DAP_REQUEST(dap::ScopesRequest, dap::ScopesResponse) \
|
||||
DAP_REQUEST(dap::SetBreakpointsRequest, dap::SetBreakpointsResponse) \
|
||||
DAP_REQUEST(dap::SetDataBreakpointsRequest, dap::SetDataBreakpointsResponse) \
|
||||
DAP_REQUEST(dap::SetExceptionBreakpointsRequest, \
|
||||
dap::SetExceptionBreakpointsResponse) \
|
||||
DAP_REQUEST(dap::SetExpressionRequest, dap::SetExpressionResponse) \
|
||||
DAP_REQUEST(dap::SetFunctionBreakpointsRequest, \
|
||||
dap::SetFunctionBreakpointsResponse) \
|
||||
DAP_REQUEST(dap::SetVariableRequest, dap::SetVariableResponse) \
|
||||
DAP_REQUEST(dap::SourceRequest, dap::SourceResponse) \
|
||||
DAP_REQUEST(dap::StackTraceRequest, dap::StackTraceResponse) \
|
||||
DAP_REQUEST(dap::StepBackRequest, dap::StepBackResponse) \
|
||||
DAP_REQUEST(dap::StepInRequest, dap::StepInResponse) \
|
||||
DAP_REQUEST(dap::StepInTargetsRequest, dap::StepInTargetsResponse) \
|
||||
DAP_REQUEST(dap::StepOutRequest, dap::StepOutResponse) \
|
||||
DAP_REQUEST(dap::TerminateRequest, dap::TerminateResponse) \
|
||||
DAP_REQUEST(dap::TerminateThreadsRequest, dap::TerminateThreadsResponse) \
|
||||
DAP_REQUEST(dap::ThreadsRequest, dap::ThreadsResponse) \
|
||||
DAP_REQUEST(dap::VariablesRequest, dap::VariablesResponse)
|
||||
|
||||
// Fuzzing main function.
|
||||
// See http://llvm.org/docs/LibFuzzer.html for details.
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
|
||||
75
fuzz/fuzz.h
Normal file
75
fuzz/fuzz.h
Normal file
@@ -0,0 +1,75 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Generated with protocol_gen.go -- do not edit this file.
|
||||
// go run scripts/protocol_gen/protocol_gen.go
|
||||
//
|
||||
// DAP version 1.59.0
|
||||
|
||||
#ifndef dap_fuzzer_h
|
||||
#define dap_fuzzer_h
|
||||
|
||||
#include "dap/protocol.h"
|
||||
|
||||
#define DAP_REQUEST_LIST() \
|
||||
DAP_REQUEST(dap::AttachRequest, dap::AttachResponse) \
|
||||
DAP_REQUEST(dap::BreakpointLocationsRequest, \
|
||||
dap::BreakpointLocationsResponse) \
|
||||
DAP_REQUEST(dap::CancelRequest, dap::CancelResponse) \
|
||||
DAP_REQUEST(dap::CompletionsRequest, dap::CompletionsResponse) \
|
||||
DAP_REQUEST(dap::ConfigurationDoneRequest, dap::ConfigurationDoneResponse) \
|
||||
DAP_REQUEST(dap::ContinueRequest, dap::ContinueResponse) \
|
||||
DAP_REQUEST(dap::DataBreakpointInfoRequest, dap::DataBreakpointInfoResponse) \
|
||||
DAP_REQUEST(dap::DisassembleRequest, dap::DisassembleResponse) \
|
||||
DAP_REQUEST(dap::DisconnectRequest, dap::DisconnectResponse) \
|
||||
DAP_REQUEST(dap::EvaluateRequest, dap::EvaluateResponse) \
|
||||
DAP_REQUEST(dap::ExceptionInfoRequest, dap::ExceptionInfoResponse) \
|
||||
DAP_REQUEST(dap::GotoRequest, dap::GotoResponse) \
|
||||
DAP_REQUEST(dap::GotoTargetsRequest, dap::GotoTargetsResponse) \
|
||||
DAP_REQUEST(dap::InitializeRequest, dap::InitializeResponse) \
|
||||
DAP_REQUEST(dap::LaunchRequest, dap::LaunchResponse) \
|
||||
DAP_REQUEST(dap::LoadedSourcesRequest, dap::LoadedSourcesResponse) \
|
||||
DAP_REQUEST(dap::ModulesRequest, dap::ModulesResponse) \
|
||||
DAP_REQUEST(dap::NextRequest, dap::NextResponse) \
|
||||
DAP_REQUEST(dap::PauseRequest, dap::PauseResponse) \
|
||||
DAP_REQUEST(dap::ReadMemoryRequest, dap::ReadMemoryResponse) \
|
||||
DAP_REQUEST(dap::RestartFrameRequest, dap::RestartFrameResponse) \
|
||||
DAP_REQUEST(dap::RestartRequest, dap::RestartResponse) \
|
||||
DAP_REQUEST(dap::ReverseContinueRequest, dap::ReverseContinueResponse) \
|
||||
DAP_REQUEST(dap::RunInTerminalRequest, dap::RunInTerminalResponse) \
|
||||
DAP_REQUEST(dap::ScopesRequest, dap::ScopesResponse) \
|
||||
DAP_REQUEST(dap::SetBreakpointsRequest, dap::SetBreakpointsResponse) \
|
||||
DAP_REQUEST(dap::SetDataBreakpointsRequest, dap::SetDataBreakpointsResponse) \
|
||||
DAP_REQUEST(dap::SetExceptionBreakpointsRequest, \
|
||||
dap::SetExceptionBreakpointsResponse) \
|
||||
DAP_REQUEST(dap::SetExpressionRequest, dap::SetExpressionResponse) \
|
||||
DAP_REQUEST(dap::SetFunctionBreakpointsRequest, \
|
||||
dap::SetFunctionBreakpointsResponse) \
|
||||
DAP_REQUEST(dap::SetInstructionBreakpointsRequest, \
|
||||
dap::SetInstructionBreakpointsResponse) \
|
||||
DAP_REQUEST(dap::SetVariableRequest, dap::SetVariableResponse) \
|
||||
DAP_REQUEST(dap::SourceRequest, dap::SourceResponse) \
|
||||
DAP_REQUEST(dap::StackTraceRequest, dap::StackTraceResponse) \
|
||||
DAP_REQUEST(dap::StartDebuggingRequest, dap::StartDebuggingResponse) \
|
||||
DAP_REQUEST(dap::StepBackRequest, dap::StepBackResponse) \
|
||||
DAP_REQUEST(dap::StepInRequest, dap::StepInResponse) \
|
||||
DAP_REQUEST(dap::StepInTargetsRequest, dap::StepInTargetsResponse) \
|
||||
DAP_REQUEST(dap::StepOutRequest, dap::StepOutResponse) \
|
||||
DAP_REQUEST(dap::TerminateRequest, dap::TerminateResponse) \
|
||||
DAP_REQUEST(dap::TerminateThreadsRequest, dap::TerminateThreadsResponse) \
|
||||
DAP_REQUEST(dap::ThreadsRequest, dap::ThreadsResponse) \
|
||||
DAP_REQUEST(dap::VariablesRequest, dap::VariablesResponse) \
|
||||
DAP_REQUEST(dap::WriteMemoryRequest, dap::WriteMemoryResponse)
|
||||
|
||||
#endif // dap_fuzzer_h
|
||||
Reference in New Issue
Block a user