arnaud-lb / php-rdkafka

Production-ready, stable Kafka client for PHP
MIT License
2.08k stars 263 forks source link

Fix #491 segfault in RdKafka\TopicPartition::__construct() #492

Closed remicollet closed 2 years ago

remicollet commented 2 years ago

Drop nullable attribute, default value should be enough.

If you want to keep it, you need an additional arg to store null, and test it (probably don't worth it)


    if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!", &topic, &topic_len, &partition, &offset, &is_null) == FAILURE) {
        ...
    }
    if (is_null) {
    ....
    }
andypost commented 2 years ago

@remicollet Thank you a lot! it passed all arches https://gitlab.alpinelinux.org/alpine/aports/-/pipelines/100300

arnaud-lb commented 2 years ago

Thanks @remicollet !

andypost commented 2 years ago

please create RC2 release

arnaud-lb commented 2 years ago

I will release it later today :)

arnaud-lb commented 2 years ago

https://pecl.php.net/package/rdkafka/6.0.0RC2

andypost commented 2 years ago

Thank you!