8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 21:23:04 +01:00
Commit Graph

267 Commits

Author SHA1 Message Date
alexpeshkoff
39896cb955 Fixed CORE-1671: atexit() calls in client libraries cause segfaults
and CORE-1079: Every attach of fbclient/fbembed library leaks 64KB of memory

To do it:
- created new template GlobalPtr, controlling access to destructors of global objects.
- applied it to global objects.

Also some related cleanup.
2008-01-23 15:52:40 +00:00
dimitr
f7941cca12 The merge continued. 2008-01-16 05:58:53 +00:00
alexpeshkoff
8711bd9215 Fixed CORE-1548: Incorrect error code in GFIX 2007-10-29 14:03:54 +00:00
asfernandes
7eb068c3ee Misc 2007-09-10 00:45:40 +00:00
robocop
c7ce762503 Simplification and check for end of buffer. 2007-09-04 08:37:06 +00:00
alexpeshkoff
ca113735a3 Fixed CORE-1328: unexpected end of input when running gfix in dialog 2007-06-19 07:35:34 +00:00
hvlad
eae128d406 Correct invalid cast in SafeArg usage 2007-05-23 08:56:24 +00:00
alexpeshkoff
6f8fb87780 Front-ported fix for CORE-1240 - any task, using libfbclient, hangs on exit on Darwin/PPC 2007-05-03 13:52:16 +00:00
alexpeshkoff
e26228270f 1. avoid code duplication defining arg_string
2. fix posix build
2007-04-27 09:20:17 +00:00
skidder
91fa2c7080 Fix MSVC8/Win32 build. IMO, these things where not nice:
- Target-dependent global typedefs
- Target-dependent stuff in COMMON .cpp files
2007-04-26 19:30:15 +00:00
alexpeshkoff
8274d3213d Fixed CORE-867 - all utilities now hide password from "ps" as soon as possible 2007-04-25 14:10:47 +00:00
alexpeshkoff
1932c8f4e7 added switch -trusted to most of firebird utilities 2007-04-07 08:47:58 +00:00
robocop
e71a03261c This is the full SafeArg implementation for getting rid of the fixed parameter types in the messages db. Alas, the legacy messages (before FB2.1) can't be changed in number of arguments neither the types of arguments sent by callers of the MsgPrint family or the fb_msg_format functions can be changed because old clients know these legacy messages and would crash. 2007-03-28 04:20:36 +00:00
robocop
409ff041dd Misc and replaced "IB" by "FB" where it made sense to me. 2007-02-11 09:04:54 +00:00
alexpeshkoff
6b537af439 A couple of improvements/cleanups, suggested by Adriano 2006-12-10 11:17:50 +00:00
alexpeshkoff
1a4652f01a Trusted authentication for windows 2006-12-08 18:38:15 +00:00
hvlad
4bfeec5432 Fixed CORE-898: uininitialized variables cause a crash in alice.cpp / common_main 2006-08-16 09:08:58 +00:00
alexpeshkoff
028ab3c597 fixed AV related with SVC_TRMNTR in services 2006-07-27 14:24:09 +00:00
alexpeshkoff
ded5cc2c49 cleanup 2006-06-06 10:34:32 +00:00
alexpeshkoff
b056a118b5 1. Avoid use of STL
2. Reworked exceptions to make status_exception always hold correct status vector
3. Avoid use of RTTI
2006-05-19 15:17:02 +00:00
robocop
4685b945e1 Misc. 2006-04-04 22:48:29 +00:00
alexpeshkoff
85c5ad885f return error in case of unexpected status_exception 2006-03-15 17:27:53 +00:00
alexpeshkoff
ca70704563 fixed gcc warning(s) 2006-01-16 15:39:55 +00:00
robocop
4f5cb7e3f6 Misc. 2006-01-07 01:32:10 +00:00
robocop
1e6d89ebfc Comment excessive dependencies on license.h. 2006-01-07 00:31:37 +00:00
alexpeshkoff
62a24d46e4 1. Moved data structures, written to database file, into ods.h.
2. Added new types of clumplets to ClumpletReader and ClupmletWriter.
3. Applied modified ClumpletReader and ClupmletWriter to /remote and partially /jrd.
4. Added active protection from remote brute-force attack to services API.
2005-11-27 20:53:09 +00:00
dimitr
7a343b8162 Moved the Services API into the engine on threadable platforms. 2005-08-10 14:47:42 +00:00
robocop
34f1f5e2c2 Fixed misplaced error messages in gfix. For example, if you do
gfix - housekeeping
you were getting "dialect number required".
2005-07-31 01:06:20 +00:00
hvlad
66658fd803 Fixed unregistered bug - crash occured in service gfix code when it tried to
reattach to currently unavailable database. Since service can't interact with
end user an endless loop leads to overflow service buffer and crash as result.
2005-07-24 15:53:06 +00:00
hvlad
ec60e195c5 Fixed SF bug #1242106 (FB 2.0 Alpha 3: In-Limbo transaction Services API broken) 2005-07-24 15:32:53 +00:00
asfernandes
59213efe7e Merge INTL branch into HEAD 2005-05-27 22:45:31 +00:00
robocop
3f0b18df85 Misc. 2005-05-16 09:15:31 +00:00
robocop
b1baf2f8f5 Misc. 2005-05-16 09:00:13 +00:00
hvlad
af740ca41a 1. Fixed bug #908319 2. Fixed inability to restore into nonexisting file with -se switch used 2005-05-14 13:45:01 +00:00
robocop
fddf92395e Misc. 2004-12-10 22:54:16 +00:00
alexpeshkoff
387e678cca applied Clumplet* classes to dpb where possible 2004-12-09 19:19:47 +00:00
robocop
bb170bd3b6 isc_interpret is fb_interpret again.
Please do a full rebuild.
2004-11-28 01:03:05 +00:00
robocop
628b088d2c Treat string literals and string constants with more respect. 2004-11-10 04:26:45 +00:00
robocop
8dd94e9d5b Misc and mark suspicious place(s). 2004-11-08 02:57:23 +00:00
aafemt
7fbf5b39e4 Supress warning 2004-10-27 10:54:25 +00:00
skidder
3e26513b38 fb_interpret->isc_interpet, deprecate isc_interpete, clean interface a little bit 2004-10-25 03:53:03 +00:00
robocop
f066045351 Misc and treat string literals as constants. 2004-10-07 08:21:15 +00:00
robocop
ed17cfafbf Style:
if<space>(
for<space>(
switch<space>(
while<space>(
2004-10-04 08:15:00 +00:00
robocop
167b187d5d Minimize forced casts 2004-09-26 07:37:34 +00:00
robocop
e6cb17cac6 Vulnerability reported by Daniel Urban.
First step: reorganize code.
Please do a full rebuild after retrieving those changes.
2004-09-22 01:59:39 +00:00
alexpeshkoff
edf58bab73 Fixed my bug in alice. Also some style changes and cleanup. 2004-09-01 14:51:33 +00:00
alexpeshkoff
c3db4aaa97 added (and used in sources) template to change and restore default pool 2004-08-30 18:11:08 +00:00
brodsom
6c2ade62b7 Silence uninitialized warnings 2004-08-26 18:22:40 +00:00
alexpeshkoff
31039a254e next step preparing to allocate auto objects memory from appropriate pool 2004-08-16 12:28:43 +00:00
brodsom
76a2f98d90 -Put thread functions into thread class
-Comment SVC_PUTSPECIFIC_DATA
2004-07-03 02:33:46 +00:00
brodsom
7168edca86 Put thread functions into thread class 2004-07-03 00:13:46 +00:00
brodsom
a80f2ee39b Put thread functions into thread class 2004-07-02 10:02:46 +00:00
alexpeshkoff
1591a54e5e Thread cleanup:
1. Added macros to declare thread entrypoints
2. THD_mutex_* functions use Firebird::Mutex
3. Thread local storage use fb_tls.h
2004-06-08 13:41:08 +00:00
brodsom
a799e5f44b -Use C++ struct declaration style. 2004-05-24 17:22:35 +00:00
brodsom
f8aeb3e612 -Remove some common.h unused macros
-Replace VA_START macro with va_start function (it was already some places where it is not used)
2004-05-23 22:56:51 +00:00
robocop
441817bd82 1.- Misc changes
2.- Style
3.- Recover dsc_ttype in dsc after Blas' cleanup as a synonym for dsc_sub_type in text types
2004-05-21 06:16:17 +00:00
brodsom
877cce340b - Convert *_thread_data macros to inline func 2004-05-20 00:56:59 +00:00
brodsom
68cb86b274 - Remove *_THREAD_DATA definitions from thd.h, are unneeded and conflicts with definitions in providers/services main headers (which need to use undef).
- Use different names for each service/provider *_THREAD_DATA macros.
2004-05-19 18:14:29 +00:00
brodsom
ee34db7e20 Macro cleaning (THREAD_*) 2004-05-15 00:58:46 +00:00
brodsom
60d9d085a0 Macro cleaning 2004-05-03 21:43:56 +00:00
skidder
43cb0d1ce4 Y-Valve handle translation layer 2004-05-02 23:06:37 +00:00
brodsom
e0854daa99 Removing ib_stdio.h 2004-04-28 22:00:03 +00:00
alexpeshkoff
045e9dc8ec 1. removed any mentions of blk_pool() from engine (and method itself)
2. replaced 'struct lls' with 'template Stack'
2004-04-18 14:22:27 +00:00
skidder
f26d84f76b 1. POSIX build libraries export only public API. 2. Unify exports for PROD_BUILD and DEV_BUILD. 3. Support for context memory pools. 4. Memory manager has lower memory overhead exceptionally on 64 bit targets 2004-03-25 23:12:50 +00:00
alexpeshkoff
7007d6f2a4 1. introduced Jrd and Ods namespaces
2. cleanup of blk* request conversions
3. fixed memory allocation in Execute Statement
2004-03-20 14:57:40 +00:00
robocop
958f9e31aa Cleanup
A few new[] - delete[] pairs fixed.
2004-03-19 06:14:53 +00:00
robocop
f58c769c37 Cleanup. In geeky words:
PandoraBox* pbox = reinterpret_cast<PandoraBox*>(&can_of_worms);
pbox->open();
pbox->flush();
Nickolay may want to undo my ods.h changes if gcc insists
in its crusade against non-PODs and poodles.
2004-03-18 05:56:06 +00:00
skidder
2762f5172b Fix comment 2004-03-11 05:46:07 +00:00
skidder
363564555e Kill a couple unneeded volatiles 2004-03-11 05:43:14 +00:00
skidder
b6e5ccd413 Clean up.
1. gds__alloc doesn't throw
2. Add NOMEM handlers to a couple places
3. kill HAVE_*SNPRINTF conditionals
2004-03-09 00:17:07 +00:00
robocop
e6187cecd2 Cleanup
Some bug fixes
Style
2004-03-07 07:58:55 +00:00
skidder
dc7aab8f9c Fix up exception handling. Handle (do not ignore) std::bad_alloc and generic exceptions, provide syscall and error information in system_call_failed 2004-03-01 03:35:23 +00:00
skidder
2c4fe73bd4 Implement new shutdown modes (single-user and full shutdown). Tested on Linux/AMD64 CS and SS 2004-02-25 01:50:40 +00:00
robocop
2fa67d46bc Cleanup
Reduce reinterpret and C casts
Fix isql so it can show all predefined blob types in readable form.
2004-02-24 05:34:44 +00:00
robocop
5c3c8abd9a Big cleanup.
God have pity on platform maintainers.
I only can compile/test Win32; sorry, folks.
2004-02-20 06:43:27 +00:00
robocop
663e3b16e7 Cleanup 2004-02-02 11:02:12 +00:00
robocop
2b295a9108 General cleanup. Sorry if I missed some occurrence. 2004-01-28 07:50:41 +00:00
dimitr
45636b8c6f Removed handle leaks in the service manager. 2004-01-07 10:23:46 +00:00
robocop
fd93837ec3 Cleanup:
const correctness
BOOLEAN -> bool
Vars in scope
Formatting
JRD_REQ -> jrd_req*
JRD_TRA -> jrd_tra*
JRD_REL -> jrd_rel*
JRD_FLD -> jrd_fld*
event -> event_t, EVENT_T dropped, EVENT should go in the future
Frank's corrections
alice's STR -> alice_str*
remote's STR -> rem_str*
etc.
It creates entities and backups and restores for me. :-)
2004-01-03 10:59:52 +00:00
robocop
ad0b5c4de3 General cleanup 2003-12-22 10:00:59 +00:00
dimitr
995417f11a Minor cleanup 2003-12-14 18:26:25 +00:00
skidder
4e30dadd8b Enable gfix/gstat services API on classic builds. Rollback Blas' changes in this area 2003-12-14 04:44:58 +00:00
robocop
9fafc348bf const correctness
vars in scope
minimal interface cleanup
small bug fixes
2003-11-28 06:48:34 +00:00
brodsom
abe35ef6fe -Remove unneeded setjmp header 2003-11-18 12:39:12 +00:00
robocop
a94dbd85fd const correctness and other minor items 2003-11-18 07:58:35 +00:00
brodsom
ad2dee472e -Removing uneeded headers (WIN_NT) 2003-11-16 11:41:25 +00:00
brodsom
6e8e00c191 -Undo gds__vax_integer to isc_vax_integer and gds__event_* to isc_event_* changes 2003-11-16 01:44:51 +00:00
brodsom
c5253ae8a5 -Replace gds__ constants with isc_ contants
-Replace codes.h with iberror.h (or remove)
-Move gds__vax_integer and gds__event_block* to alt.cpp and isc_ to gds.cpp
-Use ISC_QUAD internally
-Use isc_vax_integer internally
2003-11-11 12:19:20 +00:00
brodsom
9aaddfd37a Removing gdsold.h 2003-11-07 23:09:04 +00:00
brodsom
ff070a16a8 Replacing assert with fb_assert 2003-11-03 23:59:24 +00:00
robocop
cda707bd36 const correctness and other related changes 2003-11-01 10:26:43 +00:00
robocop
9ead7a37b4 const correctness
placed some variables in context
fixed some function signatures
closed a few possible buffer overruns
sorry to the platform maintainers, I can't verify what I did for non-Win32 builds
2003-10-29 10:53:47 +00:00
robocop
8182b6cba2 const correctness and other tasks 2003-10-16 08:51:06 +00:00
robocop
c8e2ddfe40 style 2003-10-05 06:23:04 +00:00
brodsom
8a7d7d294e extern cleaning 2003-10-02 19:20:55 +00:00
robocop
c931a674c2 Cleanup.
Hopefully harmless
It should fix the issue introduced with constness in gds__interprete for current applications.
2003-09-29 12:43:14 +00:00
brodsom
b460d5fd40 Correction 2003-09-28 00:33:10 +00:00
robocop
484c6ec372 Cleanup, const correctness, variables in scope, etc.
Having done my best to merge everyone else's changes, I hope the tree can be build with whatever other tools != MSVC6.
2003-09-25 11:49:12 +00:00
brodsom
e2a10806dc Wait a better solution with gpre 2003-09-23 19:47:22 +00:00
brodsom
c595b5fa4b Style 2003-09-22 14:13:54 +00:00
brodsom
6d38ffe912 Style 2003-09-22 08:49:45 +00:00
brodsom
95dc4332a0 Cleaning macros 2003-09-18 17:38:21 +00:00
brodsom
a93ae54602 -Macro cleaning.
-remove FB_FROM_ALICE_CPP, it is unused (set_thread_data is only used in alice.cpp) and contains uncompilable code inside.
2003-09-18 10:56:32 +00:00
brodsom
30f79b34f8 -Cleaning headers 2003-09-15 16:32:22 +00:00
brodsom
bdac17190c Clean a bit services interface
- Include service entrypoint in each proto file and remove from it the private function common to service and standalone. (burp, alice and gsec)
- Replace functions output_svc/output_thread/output_netware with SVC_output callback common for all. (burp, alice and gsec)
- Create typedef pfn_svc_output common for all svc, and correct SVC_read_ib_log and thread_test to be compatible with pfn_svc_output typedef. (svc.cpp)
- Put inside an ifdef code for '-svc_re' switch (in all sources).
2003-09-15 13:13:45 +00:00
dimitr
129c7116d4 no message 2003-09-15 12:50:39 +00:00
dimitr
6c3009fcde Fixed another problem in gfix. Thanks to Vlad Horsun. 2003-09-15 09:33:50 +00:00
dimitr
8138a08070 Fixed very old typo. Thanks to Vlad Horsun. 2003-09-15 08:05:09 +00:00
brodsom
40d9135e52 -Style 2003-09-14 01:08:37 +00:00
brodsom
7c7c2758dc BOOLEAN cleaning 2003-09-10 17:52:12 +00:00
brodsom
8db51e6eba Remove unneeded extern C 2003-09-08 01:51:41 +00:00
brodsom
b32c11986b -Use NULL instead 0 for null pointers
-Remove unneeded casts
2003-09-01 07:41:37 +00:00
brodsom
d034fe82c6 -Remove GDS_VAL and GDS_REF 2003-08-30 02:02:36 +00:00
aafemt
4584a7ce47 removing word 'struct' from variable declarations as obsolete 2003-08-27 10:20:07 +00:00
brodsom
499337fda5 Split utilities dir 2003-07-15 02:43:36 +00:00
aafemt
e5146fd644 Introduce of ISC_STATUS_ARRAY 2003-04-16 10:18:51 +00:00
aafemt
b3436b5cd7 STATUS -> ISC_STATUS 2003-04-10 06:32:58 +00:00
skidder
2ea5a6fa3b Fix up memory leak in gfix I introduced quite some time ago. Noticed by Mike Nordell 2003-03-19 11:33:46 +00:00
skidder
58dc861d81 Fix up gfix to work with Services API on Linux CS 2003-03-13 16:54:04 +00:00
brodsom
d39da2e407 Avoid unused function warning 2003-03-07 00:35:10 +00:00
brodsom
0bf30f1e26 Use the same ifdef for function declarations and definitions. (found with gcc never defined warnings) 2003-03-01 17:35:07 +00:00
brodsom
6e567674b6 New macro defined in firebird.h to remove compiler dependencies from cpp sources. 2003-02-27 21:44:48 +00:00
brodsom
20eabda391 Remove unneeded include and ifdef 2003-02-27 13:59:47 +00:00
brodsom
89702f3e88 Restore inlines 2003-02-25 00:05:06 +00:00
brodsom
a6dd59d159 Remove old protocols, only tcp is supported 2003-02-18 02:36:47 +00:00
brodsom
2d2a2282e4 Remove __cplusplus 2003-02-14 02:11:10 +00:00
brodsom
45efaaa7e0 Remove inline keyword. 2003-02-13 22:49:16 +00:00
dimitr
6e42d8c093 Fixed exception handling. 2003-02-13 12:01:28 +00:00
dimitr
9efdc8b096 CONST -> const 2003-02-13 09:19:08 +00:00
brodsom
9a71ae7987 Change #if 0 and #if 1 to NOT_USED_OR_REPLACED 2003-02-12 12:51:07 +00:00
brodsom
5e63f2cecc Remove GUI_TOOLS define 2003-02-11 20:17:56 +00:00
eku
a7f18b2e31 Removed "register" variables from the source code. It's up to the compiler
to hold variables in CPU registers.
2003-02-10 13:28:35 +00:00
brodsom
e344265b48 Remove PC_PLATFORM remaining ifdef 2003-02-07 15:20:33 +00:00
dimitr
86ac24d99a Why on earth should we bark on -user and -pass switches and consider them incompatible with something? 2003-02-04 13:14:19 +00:00
skidder
ba5e11b15c Integrate new memory manager into the engine 2003-01-16 17:47:10 +00:00
alexpeshkoff
8f04fd8e3b Cleanup of mixed use of macro FRBRD and struct why_hndl 2003-01-12 18:16:50 +00:00
alexpeshkoff
ba3e53f7be Don't include internals of struct why_hndl where it is not required. 2003-01-03 12:52:39 +00:00
alexpeshkoff
a83fcfeab9 Sorry for wrong DATABASE directive :-( 2002-12-16 16:25:09 +00:00
alexpeshkoff
3217d2c812 Rename all links to why.cpp handle to struct why_hndl * 2002-12-16 15:16:32 +00:00
eku
507b9c86c8 Do not redefine MAXPATHLEN. Always use the value supplied by the operating
system (header files).
2002-11-06 07:08:49 +00:00
seanleyne
b3ad604669 Removed support for obsolete "PC_PLATFORM" define 2002-10-31 05:06:02 +00:00
seanleyne
0b82f4aa07 Removed obsolete "Netware" port 2002-10-30 06:40:58 +00:00
seanleyne
026d8c0441 Code Cleanup, removed obsolete "Ultrix" and "Ultrix/MIPS" ports 2002-10-28 05:19:52 +00:00
eku
0c1b55dd08 Code cleanup:
Since we already have the define ISC_STATUS_LENGTH for the the length of
the status vector, we should use it! Replaced 'status[20]' with
'status[ISC_STATUS_LENGTH]'.

Replaced the different symbolic names for the maximum length of a path
(MAX_PATH, MAX_PATH_LENGTH, MAXPATHLEN) with one uniq symbol MAXPATHLEN.
2002-10-24 09:01:44 +00:00
skidder
6d64014e57 Changed engine to store source file name/line number information for EVERY allocation when DEBUG_GDS_ALLOC is defined. All allocation should be done using FB_NEW or FB_NEW_RPT macros instead of keyword new since now 2002-09-25 17:12:16 +00:00
eku
6380cea068 Removed compiler warnings. Fixed more SIG_FPTR issues. Use GNU C to check
format strings against arguments.
2002-09-24 12:57:10 +00:00
eku
da93f6697f Autoconf enhancements:
o autoconf v2.53 and later is now required to generate configure
   (sorry, but it makes many tasks easier)
 o improved tests for mmap, socklen_t and offt_64
 o added tests for atexit, on_exit, (v)fork, set(p)grp, setpgid and flock
 o added test for the keyword 'volatile'
 o fixed errors in configure.in
 o updated config.h.in and autoconfig_msvc.h (the latter may be incorrect)
 o replaced VOLATILE by volatile
 o removed SETPGRP and ATEXIT
 o replaced NO_FLOCK by HAVE_FLOCK
 o SIG_FPTR cleanup
 o vfork cleanup
2002-09-11 11:30:50 +00:00
skywalker
d89b1a0842 Changes to make fb2 compile super version for linux 2002-07-29 15:37:59 +00:00
skywalker
e5034c9ad0 merge fb1 changes. 2002-06-29 05:33:02 +00:00
bellardo
95768460e1 Fixed some warnings. 2002-04-04 05:31:13 +00:00