Skip to content

ext/pdo_odbc: infinite loop / 100% CPU when fetching a large nvarchar(max) via MS ODBC Driver 18 — SQLGetData is called with a 1-byte buffer and the loop never makes progress (distinct from GH-21534) #23443

Description

@chep6915

Description

pdo_odbc_issue.md

[ODBC][45576][...][SQLGetData.c][237]
Entry:
Statement = 0x909c88000
Column Number = 1
Target Type = 1 SQL_CHAR
Buffer Length = 1
Target Value = 0x106bfb860
StrLen Or Ind = 0x10741a850
[ODBC][45576][...][SQLGetData.c][545]
Exit:[SQL_SUCCESS_WITH_INFO]
Buffer = Indicator = -4
Strlen Or Ind = 0x10741a850 -> -4 (64 bits)

PHP Version

PHP 8.5.8 (cli) (built: Jul  1 2026 03:46:27) (NTS)
Copyright (c) The PHP Group
Built by Homebrew
Zend Engine v4.5.8, Copyright (c) Zend Technologies
    with Zend OPcache v8.5.8, Copyright (c), by Zend Technologies

Operating System

macOS 26.5.2 (build 25F84), Apple Silicon / arm64 (Darwin 25.5.0)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions