Home | History | Annotate | Download | only in cc

Lines Matching full:sanitize

78 	Sanitize struct {
116 type sanitize struct {
123 func (sanitize *sanitize) props() []interface{} {
124 return []interface{}{&sanitize.Properties}
127 func (sanitize *sanitize) begin(ctx BaseModuleContext) {
128 s := &sanitize.Properties.Sanitize
248 sanitize.Properties.SanitizerEnabled = true
258 func (sanitize *sanitize) deps(ctx BaseModuleContext, deps Deps) Deps {
259 if !sanitize.Properties.SanitizerEnabled { // || c.static() {
264 if Bool(sanitize.Properties.Sanitize.Address) {
272 func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
273 if !sanitize.Properties.SanitizerEnabled {
284 if Bool(sanitize.Properties.Sanitize.All_undefined) {
290 if Bool(sanitize.Properties.Sanitize.Undefined) {
315 sanitizers = append(sanitizers, sanitize.Properties.Sanitize.Misc_undefined...)
318 if Bool(sanitize.Properties.Sanitize.Diag.Undefined) {
322 diagSanitizers = append(diagSanitizers, sanitize.Properties.Sanitize.Diag.Misc_undefined...)
324 if Bool(sanitize.Properties.Sanitize.Address) {
349 if Bool(sanitize.Properties.Sanitize.Coverage) {
353 if Bool(sanitize.Properties.Sanitize.Safestack) {
357 if Bool(sanitize.Properties.Sanitize.Cfi) {
370 if Bool(sanitize.Properties.Sanitize.Diag.Cfi) {
375 if Bool(sanitize.Properties.Sanitize.Integer_overflow) {
380 if Bool(sanitize.Properties.Sanitize.Diag.Integer_overflow) {
391 flags.CFlags = append(flags.CFlags, "-fno-sanitize-recover=all")
406 flags.CFlags = append(flags.CFlags, "-fno-sanitize-trap="+strings.Join(diagSanitizers, ","))
410 if sanitize.Properties.Sanitize.Recover != nil {
412 strings.Join(sanitize.Properties.Sanitize.Recover, ","))
417 if Bool(sanitize.Properties.Sanitize.Address) {
428 sanitize.runtimeLibrary = runtimeLibrary
431 sanitize.androidMkRuntimeLibrary = sanitize.runtimeLibrary
433 sanitize.androidMkRuntimeLibrary = sanitize.runtimeLibrary + vendorSuffix
437 blacklist := android.OptionalPathForModuleSrc(ctx, sanitize.Properties.Sanitize.Blacklist)
446 func (sanitize *sanitize) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
448 if sanitize.androidMkRuntimeLibrary != "" {
449 fmt.Fprintln(w, "LOCAL_SHARED_LIBRARIES += "+sanitize.androidMkRuntimeLibrary)
456 func (sanitize *sanitize) inSanitizerDir() bool {
457 return sanitize.Properties.InSanitizerDir
460 func (sanitize *sanitize) Sanitizer(t sanitizerType) bool {
461 if sanitize == nil {
467 return Bool(sanitize.Properties.Sanitize.Address)
469 return Bool(sanitize.Properties.Sanitize.Thread)
471 return Bool(sanitize.Properties.Sanitize.Integer_overflow)
477 func (sanitize *sanitize) SetSanitizer(t sanitizerType, b bool) {
480 sanitize.Properties.Sanitize.Address = boolPtr(b)
482 sanitize.Properties.Sanitize.Coverage = nil
485 sanitize.Properties.Sanitize.Thread = boolPtr(b)
487 sanitize.Properties.Sanitize.Integer_overflow = boolPtr(b)
492 sanitize.Properties.SanitizerEnabled = true
499 if c, ok := mctx.Module().(*Module); ok && c.sanitize.Sanitizer(t) {
501 if d, ok := mctx.Module().(*Module); ok && c.sanitize != nil &&
502 !c.sanitize.Properties.Sanitize.Never {
503 d.sanitize.Properties.SanitizeDep = true
513 if c, ok := mctx.Module().(*Module); ok && c.sanitize != nil {
514 if c.isDependencyRoot() && c.sanitize.Sanitizer(t) {
516 modules[0].(*Module).sanitize.SetSanitizer(t, true)
517 } else if c.sanitize.Properties.SanitizeDep {
519 modules[0].(*Module).sanitize.SetSanitizer(t, false)
520 modules[1].(*Module).sanitize.SetSanitizer(t, true)
521 modules[0].(*Module).sanitize.Properties.SanitizeDep = false
522 modules[1].(*Module).sanitize.Properties.SanitizeDep = false
524 modules[1].(*Module).sanitize.Properties.InSanitizerDir = true
532 c.sanitize.Properties.SanitizeDep = false