clamrb 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d80319ba09033729946002cb5210dc5e307f55b5c150c9e84fbd58714a0c3c3
4
- data.tar.gz: e4b415697de5596cc54f6c9d8f9340389909f610579e38032c159eaafd455a34
3
+ metadata.gz: ee48d033a2f6004ad93b96da388662eb239d01728751b39fe04350d2a1e564ac
4
+ data.tar.gz: cb0bb2b613050912a5742dcf20c3029a181844e69bbb1303828de32865365984
5
5
  SHA512:
6
- metadata.gz: 5b17c574a53574170539476ecf00159cbe509104c32f80fe24acb2278d4570ee197ec11ba148632aa0e5cbf62f1708370b2d99d9b1f6fb240c2435e33c0b8588
7
- data.tar.gz: 9cb4348b76d66dd679a37ae5277a12932232062848b3cd39177d17fb2438c2a7bc2f0cc27a9343543d6f22d95aff6ac59dfc37d9163cce4afd5fd69df8710245
6
+ metadata.gz: 0bd8f61cd8cca53b0c2fd696db4fb6976d620d8a4a38d72b0d66c282b7d9a2a1ae384313b580da93ac8f54256c6ea7495ddbb7ae329a43458aad8e329ce9f422
7
+ data.tar.gz: f65c82ba6877d67747c90dcf0fa903fcd3f5fdb39405f25e8d06d64de17ffeab5f8ae37a10c351e44c16276c6940998228035084c6c870d31e37e635a44e6c05
data/.gitignore CHANGED
@@ -1,2 +1,5 @@
1
1
  *.o
2
2
  *.so
3
+ *.gem
4
+ Makefile
5
+ *.log
data/README.md CHANGED
@@ -20,12 +20,33 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
+ To create an instance of `Clamrb` and scan a file use the following example:
24
+
23
25
  ```ruby
24
26
  clamrb = Clamrb.new
25
- clamrb.scan "file.txt"
27
+ result = clamrb.scan "file.txt"
26
28
  => #<Clamrb::Result:0x00000000012d2458 @status=:infected, @identifier="Eicar-Test-Signature">
27
29
  ```
28
30
 
31
+ There are convenience predicate methods on the `Clamrb::Result` object returned from the scan. These methods allow you to quickly determine the status of the file:
32
+
33
+ ```ruby
34
+ result.safe?
35
+ => false
36
+ result.error?
37
+ => false
38
+ result.virus?
39
+ => true
40
+ ```
41
+
42
+ ## Performance
43
+
44
+ Creating a new instance of `Clamrb` causes ClamAV to load its database and initialize its engine. This can take a few seconds in some scenarios. To keep your application performing well you should create an instance of `Clamrb` during the startup sequence of your application and reuse it for your scans to keep overall scan latency to a minimum.
45
+
46
+ ## Dependencies
47
+
48
+ This gem does not have any ruby dependencies, however, it does rely on some external libraries on the system. To install clamrb you will need a compiler and the associated tools for building native ruby gems, clamav, libclamav, and the associated headers. You can review the [docker](docker) folder to see which dependencies are necessary to install and run this library.
49
+
29
50
  ## Contributing
30
51
 
31
52
  Bug reports and pull requests are welcome on GitHub at https://github.com/abedra/clamrb.
data/clamrb.gemspec ADDED
@@ -0,0 +1,22 @@
1
+ lib = File.expand_path("../lib", __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require "clamrb/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'clamrb'
7
+ s.version = Clamrb::VERSION
8
+ s.date = '2018-11-23'
9
+ s.licenses = ['MIT']
10
+ s.summary = 'Ruby interface to Clam AV'
11
+ s.description = 'Native Ruby extension for running clamav scans'
12
+ s.authors = ['Aaron Bedra']
13
+ s.email = 'aaron@aaronbedra.com'
14
+ s.extensions = ['ext/clamrb/extconf.rb']
15
+ s.homepage = 'https://github.com/abedra/clamrb'
16
+ s.require_paths = ["lib"]
17
+ s.files = Dir.chdir(File.expand_path('..', __FILE__)) do
18
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ end
20
+ s.add_development_dependency "bundler", "~> 1.16"
21
+ s.add_development_dependency "rake", "~> 10.0"
22
+ end
@@ -0,0 +1,7 @@
1
+ FROM centos:latest
2
+
3
+ RUN yum -y install epel-release
4
+ RUN yum -y update
5
+ RUN yum -y install gcc make pkg-config ruby ruby-devel clamav clamav-lib clamav-devel
6
+ RUN pkg-config --list-all
7
+ RUN gem install clamrb
@@ -0,0 +1,7 @@
1
+ FROM debian:latest
2
+
3
+ RUN apt-get -y update
4
+ RUN apt-get -y upgrade
5
+ RUN apt-get -y install gcc make pkg-config ruby-full clamav libclamav-dev
6
+
7
+ RUN gem install clamrb
@@ -0,0 +1,8 @@
1
+ FROM ubuntu:latest
2
+
3
+ RUN apt-get -y update
4
+ RUN apt-get -y upgrade
5
+ RUN apt-get -y install gcc make pkg-config ruby-full clamav libclamav-dev
6
+
7
+ RUN gem install clamrb
8
+
data/lib/clamrb/result.rb CHANGED
@@ -5,5 +5,17 @@ class Clamrb
5
5
  def initialize(status, identifier = nil)
6
6
  @status, @identifier = status, identifier
7
7
  end
8
+
9
+ def safe?
10
+ status != :infected
11
+ end
12
+
13
+ def virus?
14
+ status == :infected
15
+ end
16
+
17
+ def error?
18
+ status == :unknown
19
+ end
8
20
  end
9
21
  end
@@ -0,0 +1,3 @@
1
+ module Clamrb
2
+ VERSION = "0.0.2"
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clamrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Bedra
@@ -49,12 +49,15 @@ files:
49
49
  - Gemfile
50
50
  - README.md
51
51
  - Rakefile
52
- - ext/clamrb/Makefile
52
+ - clamrb.gemspec
53
+ - docker/centos/Dockerfile
54
+ - docker/debian/Dockerfile
55
+ - docker/ubuntu/Dockerfile
53
56
  - ext/clamrb/clamrb.c
54
57
  - ext/clamrb/extconf.rb
55
- - ext/clamrb/mkmf.log
56
58
  - lib/clamrb.rb
57
59
  - lib/clamrb/result.rb
60
+ - lib/clamrb/version.rb
58
61
  homepage: https://github.com/abedra/clamrb
59
62
  licenses:
60
63
  - MIT
data/ext/clamrb/Makefile DELETED
@@ -1,263 +0,0 @@
1
-
2
- SHELL = /bin/sh
3
-
4
- # V=0 quiet, V=1 verbose. other values don't work.
5
- V = 0
6
- Q1 = $(V:1=)
7
- Q = $(Q1:0=@)
8
- ECHO1 = $(V:1=@ :)
9
- ECHO = $(ECHO1:0=@ echo)
10
- NULLCMD = :
11
-
12
- #### Start of system configuration section. ####
13
-
14
- srcdir = .
15
- topdir = /home/abedra/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0
16
- hdrdir = $(topdir)
17
- arch_hdrdir = /home/abedra/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/x86_64-linux
18
- PATH_SEPARATOR = :
19
- VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
20
- prefix = $(DESTDIR)/home/abedra/.rvm/rubies/ruby-2.5.1
21
- rubysitearchprefix = $(rubylibprefix)/$(sitearch)
22
- rubyarchprefix = $(rubylibprefix)/$(arch)
23
- rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
24
- exec_prefix = $(prefix)
25
- vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
26
- sitearchhdrdir = $(sitehdrdir)/$(sitearch)
27
- rubyarchhdrdir = $(rubyhdrdir)/$(arch)
28
- vendorhdrdir = $(rubyhdrdir)/vendor_ruby
29
- sitehdrdir = $(rubyhdrdir)/site_ruby
30
- rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
31
- vendorarchdir = $(vendorlibdir)/$(sitearch)
32
- vendorlibdir = $(vendordir)/$(ruby_version)
33
- vendordir = $(rubylibprefix)/vendor_ruby
34
- sitearchdir = $(sitelibdir)/$(sitearch)
35
- sitelibdir = $(sitedir)/$(ruby_version)
36
- sitedir = $(rubylibprefix)/site_ruby
37
- rubyarchdir = $(rubylibdir)/$(arch)
38
- rubylibdir = $(rubylibprefix)/$(ruby_version)
39
- sitearchincludedir = $(includedir)/$(sitearch)
40
- archincludedir = $(includedir)/$(arch)
41
- sitearchlibdir = $(libdir)/$(sitearch)
42
- archlibdir = $(libdir)/$(arch)
43
- ridir = $(datarootdir)/$(RI_BASE_NAME)
44
- mandir = $(datarootdir)/man
45
- localedir = $(datarootdir)/locale
46
- libdir = $(exec_prefix)/lib
47
- psdir = $(docdir)
48
- pdfdir = $(docdir)
49
- dvidir = $(docdir)
50
- htmldir = $(docdir)
51
- infodir = $(datarootdir)/info
52
- docdir = $(datarootdir)/doc/$(PACKAGE)
53
- oldincludedir = $(DESTDIR)/usr/include
54
- includedir = $(prefix)/include
55
- localstatedir = $(prefix)/var
56
- sharedstatedir = $(prefix)/com
57
- sysconfdir = $(prefix)/etc
58
- datadir = $(datarootdir)
59
- datarootdir = $(prefix)/share
60
- libexecdir = $(exec_prefix)/libexec
61
- sbindir = $(exec_prefix)/sbin
62
- bindir = $(exec_prefix)/bin
63
- archdir = $(rubyarchdir)
64
-
65
-
66
- CC = gcc
67
- CXX = g++
68
- LIBRUBY = $(LIBRUBY_SO)
69
- LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
70
- LIBRUBYARG_SHARED = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)
71
- LIBRUBYARG_STATIC = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static
72
- empty =
73
- OUTFLAG = -o $(empty)
74
- COUTFLAG = -o $(empty)
75
- CSRCFLAG = $(empty)
76
-
77
- RUBY_EXTCONF_H =
78
- cflags = $(optflags) $(debugflags) $(warnflags)
79
- cxxflags = $(optflags) $(debugflags) $(warnflags)
80
- optflags = -O3
81
- debugflags = -ggdb3
82
- warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wmisleading-indentation -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wimplicit-fallthrough=0 -Wduplicated-cond -Wrestrict
83
- CCDLFLAGS = -fPIC
84
- CFLAGS = $(CCDLFLAGS) $(cflags) -fPIC $(ARCH_FLAG)
85
- INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
86
- DEFS =
87
- CPPFLAGS = $(DEFS) $(cppflags)
88
- CXXFLAGS = $(CCDLFLAGS) $(cxxflags) $(ARCH_FLAG)
89
- ldflags = -L. -fstack-protector -rdynamic -Wl,-export-dynamic
90
- dldflags = -Wl,--compress-debug-sections=zlib
91
- ARCH_FLAG =
92
- DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
93
- LDSHARED = $(CC) -shared
94
- LDSHAREDXX = $(CXX) -shared
95
- AR = ar
96
- EXEEXT =
97
-
98
- RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
99
- RUBY_SO_NAME = ruby
100
- RUBYW_INSTALL_NAME =
101
- RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
102
- RUBYW_BASE_NAME = rubyw
103
- RUBY_BASE_NAME = ruby
104
-
105
- arch = x86_64-linux
106
- sitearch = $(arch)
107
- ruby_version = 2.5.0
108
- ruby = $(bindir)/$(RUBY_BASE_NAME)
109
- RUBY = $(ruby)
110
- ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
111
-
112
- RM = rm -f
113
- RM_RF = $(RUBY) -run -e rm -- -rf
114
- RMDIRS = rmdir --ignore-fail-on-non-empty -p
115
- MAKEDIRS = /usr/bin/mkdir -p
116
- INSTALL = /usr/bin/install -c
117
- INSTALL_PROG = $(INSTALL) -m 0755
118
- INSTALL_DATA = $(INSTALL) -m 644
119
- COPY = cp
120
- TOUCH = exit >
121
-
122
- #### End of system configuration section. ####
123
-
124
- preload =
125
- libpath = . $(libdir)
126
- LIBPATH = -L. -L$(libdir) -Wl,-rpath,$(libdir)
127
- DEFFILE =
128
-
129
- CLEANFILES = mkmf.log
130
- DISTCLEANFILES =
131
- DISTCLEANDIRS =
132
-
133
- extout =
134
- extout_prefix =
135
- target_prefix = /clamrb
136
- LOCAL_LIBS =
137
- LIBS = $(LIBRUBYARG_SHARED) -lclamav -lpthread -ldl -lcrypt -lm -lc
138
- ORIG_SRCS = clamrb.c
139
- SRCS = $(ORIG_SRCS)
140
- OBJS = clamrb.o
141
- HDRS =
142
- LOCAL_HDRS =
143
- TARGET = clamrb
144
- TARGET_NAME = clamrb
145
- TARGET_ENTRY = Init_$(TARGET_NAME)
146
- DLLIB = $(TARGET).so
147
- EXTSTATIC =
148
- STATIC_LIB =
149
-
150
- TIMESTAMP_DIR = .
151
- BINDIR = $(bindir)
152
- RUBYCOMMONDIR = $(sitedir)$(target_prefix)
153
- RUBYLIBDIR = $(sitelibdir)$(target_prefix)
154
- RUBYARCHDIR = $(sitearchdir)$(target_prefix)
155
- HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
156
- ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
157
- TARGET_SO_DIR =
158
- TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
159
- CLEANLIBS = $(TARGET_SO)
160
- CLEANOBJS = *.o *.bak
161
-
162
- all: $(DLLIB)
163
- static: $(STATIC_LIB)
164
- .PHONY: all install static install-so install-rb
165
- .PHONY: clean clean-so clean-static clean-rb
166
-
167
- clean-static::
168
- clean-rb-default::
169
- clean-rb::
170
- clean-so::
171
- clean: clean-so clean-static clean-rb-default clean-rb
172
- -$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
173
-
174
- distclean-rb-default::
175
- distclean-rb::
176
- distclean-so::
177
- distclean-static::
178
- distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
179
- -$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
180
- -$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
181
- -$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
182
-
183
- realclean: distclean
184
- install: install-so install-rb
185
-
186
- install-so: $(DLLIB) $(TIMESTAMP_DIR)/.sitearchdir.-.clamrb.time
187
- $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
188
- clean-static::
189
- -$(Q)$(RM) $(STATIC_LIB)
190
- install-rb: pre-install-rb do-install-rb install-rb-default
191
- install-rb-default: pre-install-rb-default do-install-rb-default
192
- pre-install-rb: Makefile
193
- pre-install-rb-default: Makefile
194
- do-install-rb:
195
- do-install-rb-default:
196
- pre-install-rb-default:
197
- @$(NULLCMD)
198
- $(TIMESTAMP_DIR)/.sitearchdir.-.clamrb.time:
199
- $(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
200
- $(Q) $(TOUCH) $@
201
-
202
- site-install: site-install-so site-install-rb
203
- site-install-so: install-so
204
- site-install-rb: install-rb
205
-
206
- .SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
207
-
208
- .cc.o:
209
- $(ECHO) compiling $(<)
210
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
211
-
212
- .cc.S:
213
- $(ECHO) translating $(<)
214
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
215
-
216
- .mm.o:
217
- $(ECHO) compiling $(<)
218
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
219
-
220
- .mm.S:
221
- $(ECHO) translating $(<)
222
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
223
-
224
- .cxx.o:
225
- $(ECHO) compiling $(<)
226
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
227
-
228
- .cxx.S:
229
- $(ECHO) translating $(<)
230
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
231
-
232
- .cpp.o:
233
- $(ECHO) compiling $(<)
234
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
235
-
236
- .cpp.S:
237
- $(ECHO) translating $(<)
238
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
239
-
240
- .c.o:
241
- $(ECHO) compiling $(<)
242
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
243
-
244
- .c.S:
245
- $(ECHO) translating $(<)
246
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
247
-
248
- .m.o:
249
- $(ECHO) compiling $(<)
250
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
251
-
252
- .m.S:
253
- $(ECHO) translating $(<)
254
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
255
-
256
- $(TARGET_SO): $(OBJS) Makefile
257
- $(ECHO) linking shared-object clamrb/$(DLLIB)
258
- -$(Q)$(RM) $(@)
259
- $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
260
-
261
-
262
-
263
- $(OBJS): $(HDRS) $(ruby_headers)
data/ext/clamrb/mkmf.log DELETED
@@ -1,34 +0,0 @@
1
- have_library: checking for -lclamav... -------------------- yes
2
-
3
- "gcc -o conftest -I/home/abedra/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/x86_64-linux -I/home/abedra/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/ruby/backward -I/home/abedra/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0 -I. -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wmisleading-indentation -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wimplicit-fallthrough=0 -Wduplicated-cond -Wrestrict -fPIC conftest.c -L. -L/home/abedra/.rvm/rubies/ruby-2.5.1/lib -Wl,-rpath,/home/abedra/.rvm/rubies/ruby-2.5.1/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-rpath,/home/abedra/.rvm/rubies/ruby-2.5.1/lib -L/home/abedra/.rvm/rubies/ruby-2.5.1/lib -lruby -lpthread -ldl -lcrypt -lm -lc"
4
- checked program was:
5
- /* begin */
6
- 1: #include "ruby.h"
7
- 2:
8
- 3: int main(int argc, char **argv)
9
- 4: {
10
- 5: return 0;
11
- 6: }
12
- /* end */
13
-
14
- "gcc -o conftest -I/home/abedra/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/x86_64-linux -I/home/abedra/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/ruby/backward -I/home/abedra/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0 -I. -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wmisleading-indentation -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wimplicit-fallthrough=0 -Wduplicated-cond -Wrestrict -fPIC conftest.c -L. -L/home/abedra/.rvm/rubies/ruby-2.5.1/lib -Wl,-rpath,/home/abedra/.rvm/rubies/ruby-2.5.1/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-rpath,/home/abedra/.rvm/rubies/ruby-2.5.1/lib -L/home/abedra/.rvm/rubies/ruby-2.5.1/lib -lruby -lclamav -lpthread -ldl -lcrypt -lm -lc"
15
- checked program was:
16
- /* begin */
17
- 1: #include "ruby.h"
18
- 2:
19
- 3: /*top*/
20
- 4: extern int t(void);
21
- 5: int main(int argc, char **argv)
22
- 6: {
23
- 7: if (argc > 1000000) {
24
- 8: printf("%p", &t);
25
- 9: }
26
- 10:
27
- 11: return 0;
28
- 12: }
29
- 13:
30
- 14: int t(void) { ; return 0; }
31
- /* end */
32
-
33
- --------------------
34
-