Skip to content

2.27.0.0-b22

@OlegLoginov OlegLoginov tagged this 25 Apr 15:43
Summary:
Fixing this ASAN error:
```
../../../../../../src/postgres/src/backend/commands/event_trigger.c:1817:36: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here
```
Call stack:
```
#0 0x55597fecb32d in EventTriggerCollectAlterTSConfig : src/postgres/src/backend/commands/event_trigger.c:1817:2
#1 0x55598004305e in DropConfigurationMapping : src/postgres/src/backend/commands/tsearchcmds.c:1518:2
```
The function `EventTriggerCollectAlterTSConfig()` is called with `NULL` argument in the PG code:
`static void DropConfigurationMapping(......) {`
`EventTriggerCollectAlterTSConfig(stmt, cfgId, NULL, 0);`
This `NULL` can go into `memcpy()`.
`memcpy(command->d.atscfg.dictIds, dictIds, sizeof(Oid) * ndicts);    <<<  dictIds==NULL here`

 The case is not expected. The code is fixed.

Test Plan: ./yb_build.sh asan --java-test org.yb.pgsql.TestPgRegressTypesString#schedule

Reviewers: mihnea, kfranz

Reviewed By: kfranz

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D43395
Assets 2
Loading