Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yaf_Loader::autolaod() 导致 Segmentation fault #90

Closed
littlemiaor opened this issue Apr 4, 2014 · 6 comments
Closed

Yaf_Loader::autolaod() 导致 Segmentation fault #90

littlemiaor opened this issue Apr 4, 2014 · 6 comments

Comments

@littlemiaor
Copy link

yaf

@wenjun1055
Copy link
Contributor

查了下,这里的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)

@littlemiaor
Copy link
Author

directory 是 NULL, 不会进入 L788 吧

@wenjun1055
Copy link
Contributor

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

@wenjun1055
Copy link
Contributor

你把core发出来呢

@littlemiaor
Copy link
Author

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

@littlemiaor
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants