From: Derrick Stolee Date: Fri, 31 Aug 2018 17:19:45 GMT Subject: Re: [PATCH 1/8] trace2: create new combined trace facility Message-ID: In-Reply-To: <82885700379efe6d6a83629cac4d943b99b393bf.1535734192.git.gitgitgadget@gmail.com> On 8/31/2018 12:49 PM, Jeff Hostetler via GitGitGadget wrote: > + if (tr2key_trace_want(&tr2key_event)) { > + struct tr2tls_thread_ctx *ctx = tr2tls_get_self(); > + if (ctx->nr_open_regions <= tr2env_event_depth_wanted) { This should also compare to TR2_MAX_REGION_NESTING to avoid memory bounds issues. It may even be worth sending a message that the depth went beyond the limits. Thanks, -Stolee