Enable ASAN & UBSAN when running tests in debug on CQ/CI

Change-Id: Ifde66e0f0b40771c1d705d26b6ad713cdcebd7a4
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/19062
Commit-Queue: Andrew Grieve <agrieve@google.com>
Reviewed-by: Roland McGrath <mcgrathr@google.com>
diff --git a/infra/recipes/gn.expected/ci_linux.json b/infra/recipes/gn.expected/ci_linux.json
index bdb11fe..5a76c33 100644
--- a/infra/recipes/gn.expected/ci_linux.json
+++ b/infra/recipes/gn.expected/ci_linux.json
@@ -574,7 +574,9 @@
       "python3",
       "-u",
       "[START_DIR]/gn/build/gen.py",
-      "-d"
+      "-d",
+      "--use-asan",
+      "--use-ubsan"
     ],
     "cwd": "[START_DIR]/gn",
     "env": {
diff --git a/infra/recipes/gn.expected/ci_mac.json b/infra/recipes/gn.expected/ci_mac.json
index b04aa91..e8d64e2 100644
--- a/infra/recipes/gn.expected/ci_mac.json
+++ b/infra/recipes/gn.expected/ci_mac.json
@@ -308,7 +308,9 @@
       "python3",
       "-u",
       "[START_DIR]/gn/build/gen.py",
-      "-d"
+      "-d",
+      "--use-asan",
+      "--use-ubsan"
     ],
     "cwd": "[START_DIR]/gn",
     "env": {
diff --git a/infra/recipes/gn.expected/ci_win.json b/infra/recipes/gn.expected/ci_win.json
index c294224..61d1603 100644
--- a/infra/recipes/gn.expected/ci_win.json
+++ b/infra/recipes/gn.expected/ci_win.json
@@ -245,7 +245,9 @@
       "python3",
       "-u",
       "[START_DIR]\\gn\\build\\gen.py",
-      "-d"
+      "-d",
+      "--use-asan",
+      "--use-ubsan"
     ],
     "cwd": "[START_DIR]\\gn",
     "env": {
diff --git a/infra/recipes/gn.expected/cipd_exists.json b/infra/recipes/gn.expected/cipd_exists.json
index dc9a8cb..0c22ae2 100644
--- a/infra/recipes/gn.expected/cipd_exists.json
+++ b/infra/recipes/gn.expected/cipd_exists.json
@@ -574,7 +574,9 @@
       "python3",
       "-u",
       "[START_DIR]/gn/build/gen.py",
-      "-d"
+      "-d",
+      "--use-asan",
+      "--use-ubsan"
     ],
     "cwd": "[START_DIR]/gn",
     "env": {
diff --git a/infra/recipes/gn.expected/cipd_register.json b/infra/recipes/gn.expected/cipd_register.json
index 3f2a6ac..4303782 100644
--- a/infra/recipes/gn.expected/cipd_register.json
+++ b/infra/recipes/gn.expected/cipd_register.json
@@ -574,7 +574,9 @@
       "python3",
       "-u",
       "[START_DIR]/gn/build/gen.py",
-      "-d"
+      "-d",
+      "--use-asan",
+      "--use-ubsan"
     ],
     "cwd": "[START_DIR]/gn",
     "env": {
diff --git a/infra/recipes/gn.expected/cq_linux.json b/infra/recipes/gn.expected/cq_linux.json
index 7afba99..035f993 100644
--- a/infra/recipes/gn.expected/cq_linux.json
+++ b/infra/recipes/gn.expected/cq_linux.json
@@ -625,7 +625,9 @@
       "python3",
       "-u",
       "[START_DIR]/gn/build/gen.py",
-      "-d"
+      "-d",
+      "--use-asan",
+      "--use-ubsan"
     ],
     "cwd": "[START_DIR]/gn",
     "env": {
diff --git a/infra/recipes/gn.expected/cq_mac.json b/infra/recipes/gn.expected/cq_mac.json
index 7419c83..6263b81 100644
--- a/infra/recipes/gn.expected/cq_mac.json
+++ b/infra/recipes/gn.expected/cq_mac.json
@@ -359,7 +359,9 @@
       "python3",
       "-u",
       "[START_DIR]/gn/build/gen.py",
-      "-d"
+      "-d",
+      "--use-asan",
+      "--use-ubsan"
     ],
     "cwd": "[START_DIR]/gn",
     "env": {
diff --git a/infra/recipes/gn.expected/cq_win.json b/infra/recipes/gn.expected/cq_win.json
index c1cf437..390a590 100644
--- a/infra/recipes/gn.expected/cq_win.json
+++ b/infra/recipes/gn.expected/cq_win.json
@@ -296,7 +296,9 @@
       "python3",
       "-u",
       "[START_DIR]\\gn\\build\\gen.py",
-      "-d"
+      "-d",
+      "--use-asan",
+      "--use-ubsan"
     ],
     "cwd": "[START_DIR]\\gn",
     "env": {
diff --git a/infra/recipes/gn.py b/infra/recipes/gn.py
index 0d0b04b..f4723bd 100644
--- a/infra/recipes/gn.py
+++ b/infra/recipes/gn.py
@@ -155,7 +155,7 @@
   configs = [
       {
           'name': 'debug',
-          'args': ['-d'],
+          'args': ['-d', '--use-asan', '--use-ubsan'],
           'targets': [api.target.host],
       },
       {