csource

package
v0.0.0-...-4e6bda9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

AUTOGENERATED FROM executor/common_linux.h

Index

Constants

This section is empty.

Variables

View Source
var NoCompilerErr = errors.New("no target compiler")

Functions

func Build

func Build(target *prog.Target, lang, src string) (string, error)

Build builds a C/C++ program from source src and returns name of the resulting binary. lang can be "c" or "c++".

func Format

func Format(src []byte) ([]byte, error)

Format reformats C source using clang-format.

func Write

func Write(p *prog.Prog, opts Options) ([]byte, error)

Types

type Options

type Options struct {
	Threaded bool
	Collide  bool
	Repeat   bool
	Procs    int
	Sandbox  string

	Fault     bool // inject fault into FaultCall/FaultNth
	FaultCall int
	FaultNth  int

	// These options allow for a more fine-tuned control over the generated C code.
	EnableTun  bool
	UseTmpDir  bool
	HandleSegv bool
	WaitRepeat bool
	Debug      bool

	// Generate code for use with repro package to prints log messages,
	// which allows to distinguish between a hang and an absent crash.
	Repro bool
}

func (Options) Check

func (opts Options) Check() error

Check checks if the opts combination is valid or not. For example, Collide without Threaded is not valid. Invalid combinations must not be passed to Write.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL