Giter VIP home page Giter VIP logo

Comments (6)

wenjun1055 avatar wenjun1055 commented on May 30, 2024

查了下,这里的Segmentation fault应该是这样产生的:
1、直接在cli下面使用Yaf_Loader,所以app_directory没有设置初始值(https://github.com/laruence/php-yaf/blob/master/yaf_loader.c#L707)
2、然后传入的是个空字符串,所以class_name_len=0,而directory为初始值NULL(https://github.com/laruence/php-yaf/blob/master/yaf_loader.c#L711)
3、然后再进入了efree(directory),释放不存在的内存导致(https://github.com/laruence/php-yaf/blob/master/yaf_loader.c#L789)

from yaf.

littlemiaor avatar littlemiaor commented on May 30, 2024

directory 是 NULL, 不会进入 L788 吧

from yaf.

wenjun1055 avatar wenjun1055 commented on May 30, 2024

就是哈,疏忽了一下,重新看看

from yaf.

wenjun1055 avatar wenjun1055 commented on May 30, 2024

你把core发出来呢

from yaf.

littlemiaor avatar littlemiaor commented on May 30, 2024

上班呢 我看看晚上能不能发

from yaf.

littlemiaor avatar littlemiaor commented on May 30, 2024

可以参考 https://github.com/php/php-src/blob/master/ext/spl/php_spl.c#L356

from yaf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.