[pgAdmin4][Patch] RM #3277 Runtime startup error handling is brokenon Windows

Поиск
Список
Период
Сортировка
От Akshay Joshi
Тема [pgAdmin4][Patch] RM #3277 Runtime startup error handling is brokenon Windows
Дата
Msg-id CANxoLDeYWN9j5VjWmY-HxZK2R8-kNmw5=wHw8LkZmV=r7dAWxw@mail.gmail.com
обсуждение исходный текст
Ответы Re: [pgAdmin4][Patch] RM #3277 Runtime startup error handling isbroken on Windows  (Victoria Henry <vhenry@pivotal.io>)
Re: [pgAdmin4][Patch] RM #3277 Runtime startup error handling isbroken on Windows  (Dave Page <dpage@pgadmin.org>)
Список pgadmin-hackers
Hi Hackers,

Attached is the patch file to fix RM #3277 Runtime startup error handling is broken on Windows. I have figure out the crash at the following call of Server.cpp(line no 326):

PyRun_SimpleFile(fdopen(PyObject_AsFileDescriptor(PyFileObject),"r"), m_appfile_utf8.data())

When application exits due to some error it throws BEX refers to Buffer Overflow Exception, when I debug and found that it throws BEX for above function call. I have replace that call with the following:
PyRun_SimpleFile(cp, m_appfile_utf8.data())
Anyways we have open the file using fopen() at the top of the function then why to open that again using fdopen() in the first call. 

Tested the patch with Python 3.5 and 3.6, please review it.

--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
Вложения

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Murtuza Zabuawala
Дата:
Сообщение: Re: [pgAdmin4][Patch#3389] To prevent unwanted model changes inServer dialog
Следующее
От: Akshay Joshi
Дата:
Сообщение: pgAdmin 4 commit: Fixed ordering of changes in release note and addedo