pingcap / pingcap/tidb

The test for the package “./executor” fails when using -asan.

Open
#32,952 6 comments 7 reactions 1 assignee Claimed by @djshow832 View on GitHub
severity/moderate sig/sql-infra type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)
1. download tidb source code: git clone https://github.com/pingcap/tidb.git
2. download golang souce code: git clone https://github.com/golang/go.git
3. build a master go
4. cd tidb/executor and run `go test -asan -c && ./executor.test`

### 2. What did you expect to see? (Required)
pass
### 3. What did you see instead (Required)
==4500==ERROR: AddressSanitizer: use-after-poison on address 0x2040019e0918 at pc 0x0000024539e8 bp 0x000000000000 sp 0x204001a09670
READ of size 8 at 0x2040019e0918 thread T2
#0 0x24539e7 in github.com/pingcap/tidb/util/codec.encodeHashChunkRowIdx /home/fanzha02/sharefolder/asanprojecttest/tidb/util/chunk/column.go:542
#1 0xffff8a4b7c47 (/usr/lib/aarch64-linux-gnu/libasan.so.4+0xdac47)
#2 0x13816cf in asancall /home/fanzha02/work/go_project/gotest/src/runtime/asan_arm64.s:66

Address 0x2040019e0918 is a wild pointer.
SUMMARY: AddressSanitizer: use-after-poison /home/fanzha02/sharefolder/asanprojecttest/tidb/util/chunk/column.go:542 in github.com/pingcap/tidb/util/codec.encodeHashChunkRowIdx

### 4. What is your TiDB version? (Required)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.