Skip to content

Commit

Permalink
Fix unpatched global vars (#6362)
Browse files Browse the repository at this point in the history
  • Loading branch information
nepal authored Jul 6, 2024
1 parent e3dfb27 commit 1fa2be9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ydb/library/yql/parser/pg_wrapper/copy_src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TOOL_DIR=$(dirname $COMPILER)
export PATH="$TOOL_DIR:$PATH"
export CC=clang
export AR=llvm-ar
export CFLAGS="-ffunction-sections -fdata-sections"
export CFLAGS="-ffunction-sections -fdata-sections -DWAIT_USE_SELF_PIPE"

echo configuring
./configure \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,16 @@ static __thread volatile sig_atomic_t waiting = false;

#ifdef WAIT_USE_SIGNALFD
/* On Linux, we'll receive SIGURG via a signalfd file descriptor. */
static __thread int signal_fd = -1;
static int signal_fd = -1;
#endif

#ifdef WAIT_USE_SELF_PIPE
/* Read and write ends of the self-pipe */
static int selfpipe_readfd = -1;
static int selfpipe_writefd = -1;
static __thread int selfpipe_readfd = -1;
static __thread int selfpipe_writefd = -1;

/* Process owning the self-pipe --- needed for checking purposes */
static int selfpipe_owner_pid = 0;
static __thread int selfpipe_owner_pid = 0;

/* Private function prototypes */
static void latch_sigurg_handler(SIGNAL_ARGS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#define BLCKSZ 8192

/* Saved arguments from configure */
#define CONFIGURE_ARGS " '--with-openssl' '--with-icu' '--with-libxml' '--enable-debug' '--without-systemd' '--without-gssapi' '--with-lz4' '--with-ossp-uuid' 'CC=clang' 'CFLAGS=-ffunction-sections -fdata-sections'"
#define CONFIGURE_ARGS " '--with-openssl' '--with-icu' '--with-libxml' '--enable-debug' '--without-systemd' '--without-gssapi' '--with-lz4' '--with-ossp-uuid' 'CC=clang' 'CFLAGS=-ffunction-sections -fdata-sections -DWAIT_USE_SELF_PIPE'"

/* Define to the default TCP port number on which the server listens and to
which clients will try to connect. This can be overridden at run-time, but
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static char *win32_socket_strerror(int errnum, char *buf, size_t buflen);
char *
pg_strerror(int errnum)
{
static char errorstr_buf[PG_STRERROR_R_BUFLEN];
static __thread char errorstr_buf[PG_STRERROR_R_BUFLEN];

return pg_strerror_r(errnum, errorstr_buf, sizeof(errorstr_buf));
}
Expand Down
4 changes: 3 additions & 1 deletion ydb/library/yql/parser/pg_wrapper/vars.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,9 @@ scanbuflen
scanstring
scram_mock_salt.sha_digest
segment_size
selfpipe_owner_pid
selfpipe_readfd
selfpipe_writefd
sendTimeLine
sendTimeLineIsHistoric
sendTimeLineNextTLI
Expand Down Expand Up @@ -1363,7 +1366,6 @@ show_tcp_user_timeout.nbuf
show_unix_socket_permissions.buf
shutdown_requested
signal_due_at
signal_fd
signal_pending
sin_30
sizeComboCids
Expand Down

0 comments on commit 1fa2be9

Please sign in to comment.